Lines Matching refs:size
44 size_t size; in TEST_F() local
47 size = leb128::encode<uint32_t>(result, 2); in TEST_F()
50 ASSERT_TRUE(size == 1); in TEST_F()
53 size = leb128::encode<uint32_t>(result, 127); in TEST_F()
56 ASSERT_TRUE(size == 1); in TEST_F()
59 size = leb128::encode<uint32_t>(result, 128); in TEST_F()
63 ASSERT_TRUE(size == 2); in TEST_F()
66 size = leb128::encode<uint32_t>(result, 129); in TEST_F()
70 ASSERT_TRUE(size == 2); in TEST_F()
73 size = leb128::encode<uint32_t>(result, 130); in TEST_F()
77 ASSERT_TRUE(size == 2); in TEST_F()
80 size = leb128::encode<uint32_t>(result, 12857); in TEST_F()
84 ASSERT_TRUE(size == 2); in TEST_F()
90 size_t size; in TEST_F() local
93 size = leb128::encode<uint64_t>(result, 2); in TEST_F()
96 ASSERT_TRUE(size == 1); in TEST_F()
99 size = leb128::encode<uint64_t>(result, 127); in TEST_F()
102 ASSERT_TRUE(size == 1); in TEST_F()
105 size = leb128::encode<uint64_t>(result, 128); in TEST_F()
109 ASSERT_TRUE(size == 2); in TEST_F()
112 size = leb128::encode<uint64_t>(result, 129); in TEST_F()
116 ASSERT_TRUE(size == 2); in TEST_F()
119 size = leb128::encode<uint64_t>(result, 130); in TEST_F()
123 ASSERT_TRUE(size == 2); in TEST_F()
126 size = leb128::encode<uint64_t>(result, 12857); in TEST_F()
130 ASSERT_TRUE(size == 2); in TEST_F()
136 size_t size; in TEST_F() local
139 size = leb128::encode<int32_t>(result, 2); in TEST_F()
142 ASSERT_TRUE(size == 1); in TEST_F()
145 size = leb128::encode<int32_t>(result, -2); in TEST_F()
148 ASSERT_TRUE(size == 1); in TEST_F()
151 size = leb128::encode<int32_t>(result, 127); in TEST_F()
155 ASSERT_TRUE(size == 2); in TEST_F()
158 size = leb128::encode<int32_t>(result, -127); in TEST_F()
162 ASSERT_TRUE(size == 2); in TEST_F()
165 size = leb128::encode<int32_t>(result, 128); in TEST_F()
169 ASSERT_TRUE(size == 2); in TEST_F()
172 size = leb128::encode<int32_t>(result, -128); in TEST_F()
176 ASSERT_TRUE(size == 2); in TEST_F()
179 size = leb128::encode<int32_t>(result, 129); in TEST_F()
183 ASSERT_TRUE(size == 2); in TEST_F()
186 size = leb128::encode<int32_t>(result, -129); in TEST_F()
190 ASSERT_TRUE(size == 2); in TEST_F()
195 size_t size; in TEST_F() local
199 ASSERT_TRUE(leb128::decode<uint64_t>(buffer, size) == 2); in TEST_F()
200 ASSERT_TRUE(size == 1); in TEST_F()
204 ASSERT_TRUE(leb128::decode<uint64_t>(buffer, size) == 127); in TEST_F()
205 ASSERT_TRUE(size == 1); in TEST_F()
209 ASSERT_TRUE(leb128::decode<uint64_t>(buffer, size) == 128); in TEST_F()
210 ASSERT_TRUE(size == 2); in TEST_F()
214 ASSERT_TRUE(leb128::decode<uint64_t>(buffer, size) == 129); in TEST_F()
215 ASSERT_TRUE(size == 2); in TEST_F()
219 ASSERT_TRUE(leb128::decode<uint64_t>(buffer, size) == 130); in TEST_F()
220 ASSERT_TRUE(size == 2); in TEST_F()
224 ASSERT_TRUE(leb128::decode<uint64_t>(buffer, size) == 12857); in TEST_F()
225 ASSERT_TRUE(size == 2); in TEST_F()
230 size_t size; in TEST_F() local
234 ASSERT_EQ(leb128::decode<int64_t>(buffer, size), 2); in TEST_F()
235 ASSERT_TRUE(size == 1); in TEST_F()
239 ASSERT_EQ(leb128::decode<int64_t>(buffer, size), -2); in TEST_F()
240 ASSERT_TRUE(size == 1); in TEST_F()
244 ASSERT_EQ(leb128::decode<int64_t>(buffer, size), 127); in TEST_F()
245 ASSERT_TRUE(size == 2); in TEST_F()
249 ASSERT_EQ(leb128::decode<int64_t>(buffer, size), -127); in TEST_F()
250 ASSERT_TRUE(size == 2); in TEST_F()
254 ASSERT_EQ(leb128::decode<int64_t>(buffer, size), 128); in TEST_F()
255 ASSERT_TRUE(size == 2); in TEST_F()
259 ASSERT_EQ(leb128::decode<int64_t>(buffer, size), -128); in TEST_F()
260 ASSERT_TRUE(size == 2); in TEST_F()
264 ASSERT_EQ(leb128::decode<int64_t>(buffer, size), 129); in TEST_F()
265 ASSERT_TRUE(size == 2); in TEST_F()
269 ASSERT_EQ(leb128::decode<int64_t>(buffer, size), -129); in TEST_F()
270 ASSERT_TRUE(size == 2); in TEST_F()
297 size_t size; in TEST_F() local
300 size = leb128::encode<uint32_t>(result, 0); in TEST_F()
303 ASSERT_TRUE(size == 1); in TEST_F()
306 size = leb128::encode<uint64_t>(result, 0); in TEST_F()
309 ASSERT_TRUE(size == 1); in TEST_F()
312 size = leb128::encode<uint32_t>(result, 1); in TEST_F()
315 ASSERT_TRUE(size == 1); in TEST_F()
318 size = leb128::encode<uint64_t>(result, 1); in TEST_F()
321 ASSERT_TRUE(size == 1); in TEST_F()
324 size = leb128::encode<uint32_t>(result, 16256); in TEST_F()
328 ASSERT_TRUE(size == 2); in TEST_F()
331 size = leb128::encode<uint64_t>(result, 16256); in TEST_F()
335 ASSERT_TRUE(size == 2); in TEST_F()
338 size = leb128::encode<uint32_t>(result, 0x3b4); in TEST_F()
342 ASSERT_TRUE(size == 2); in TEST_F()
345 size = leb128::encode<uint64_t>(result, 0x3b4); in TEST_F()
349 ASSERT_TRUE(size == 2); in TEST_F()
352 size = leb128::encode<uint32_t>(result, 0x40c); in TEST_F()
356 ASSERT_TRUE(size == 2); in TEST_F()
359 size = leb128::encode<uint64_t>(result, 0x40c); in TEST_F()
363 ASSERT_TRUE(size == 2); in TEST_F()
366 size = leb128::encode<uint32_t>(result, 0xffffffff); in TEST_F()
373 ASSERT_TRUE(size == 5); in TEST_F()
376 size = leb128::encode<uint64_t>(result, 0xffffffff); in TEST_F()
383 ASSERT_TRUE(size == 5); in TEST_F()
414 size_t size; in TEST_F() local
417 size = leb128::encode<int32_t>(result, 0); in TEST_F()
420 ASSERT_TRUE(size == 1); in TEST_F()
423 size = leb128::encode<int64_t>(result, 0); in TEST_F()
426 ASSERT_TRUE(size == 1); in TEST_F()
429 size = leb128::encode<int32_t>(result, 1); in TEST_F()
432 ASSERT_TRUE(size == 1); in TEST_F()
435 size = leb128::encode<int64_t>(result, 1); in TEST_F()
438 ASSERT_TRUE(size == 1); in TEST_F()
441 size = leb128::encode<int32_t>(result, -1); in TEST_F()
444 ASSERT_TRUE(size == 1); in TEST_F()
447 size = leb128::encode<int64_t>(result, -1); in TEST_F()
450 ASSERT_TRUE(size == 1); in TEST_F()
496 size_t size; in TEST_F() local
505 ASSERT_TRUE(leb128::decode<uint64_t>(buffer, size) == 154452); in TEST_F()
506 ASSERT_TRUE(size == 3); in TEST_F()
512 size_t size; in TEST_F() local
521 ASSERT_TRUE(leb128::decode<uint64_t>(buffer, size) == 154452); in TEST_F()
522 ASSERT_TRUE(size == 3); in TEST_F()