• Home
  • Raw
  • Download

Lines Matching refs:ba

29 void FillTestByteArray(ByteArray* ba, int32_t size) {  in FillTestByteArray()  argument
31 ba->Put(i, (byte_t)(i % 256)); in FillTestByteArray()
35 void ReadByteArrayWithBuffer(ByteArray* ba, ByteVector* buffer, ByteVector* b) { in ReadByteArrayWithBuffer() argument
36 b->resize(ba->Length()); in ReadByteArrayWithBuffer()
38 while (index < ba->Length()) { in ReadByteArrayWithBuffer()
39 int32_t bytes_read = ba->Get(index, buffer); in ReadByteArrayWithBuffer()
46 void ReadByteArrayWithSlidingWindow(ByteArray* ba, int window_size, in ReadByteArrayWithSlidingWindow() argument
48 b->resize(ba->Length()); in ReadByteArrayWithSlidingWindow()
51 while (index < ba->Length()) { in ReadByteArrayWithSlidingWindow()
54 int32_t bytes_read = ba->Get(index, &((*b)[0]), index, actual_window_size); in ReadByteArrayWithSlidingWindow()
93 bool CopyTest(ByteArray* ba) { in CopyTest() argument
94 ByteArrayPtr fixed_copy = new MemoryByteArray(ba->Length()); in CopyTest()
95 ba->CopyTo(fixed_copy); in CopyTest()
96 EXPECT_EQ(ba->Length(), fixed_copy->Length()); in CopyTest()
97 EXPECT_TRUE(ReadComparison(ba, fixed_copy)); in CopyTest()
100 ba->CopyTo(growable_copy); in CopyTest()
101 EXPECT_EQ(ba->Length(), growable_copy->Length()); in CopyTest()
102 EXPECT_TRUE(ReadComparison(ba, growable_copy)); in CopyTest()
107 bool ByteArrayTester(ByteArray* ba) { in ByteArrayTester() argument
108 return CopyTest(ba); in ByteArrayTester()
119 ByteArrayPtr ba = new MemoryByteArray(size); in TestMemoryByteArray() local
120 byte_array_test::FillTestByteArray(ba, size); in TestMemoryByteArray()
121 EXPECT_TRUE(byte_array_test::ByteArrayTester(ba)); in TestMemoryByteArray()
133 ByteArrayPtr ba = new GrowableMemoryByteArray(); in TestGrowableMemoryByteArray() local
134 byte_array_test::FillTestByteArray(ba, size); in TestGrowableMemoryByteArray()
135 EXPECT_TRUE(byte_array_test::ByteArrayTester(ba)); in TestGrowableMemoryByteArray()