• Home
  • Raw
  • Download

Lines Matching refs:buffer

42   leb128::ByteType buffer[2];  in TEST_F()  local
46 result = buffer; in TEST_F()
48 ASSERT_EQ(buffer[0], 2); in TEST_F()
49 ASSERT_EQ(result, buffer + 1); in TEST_F()
52 result = buffer; in TEST_F()
54 ASSERT_EQ(buffer[0], 127); in TEST_F()
55 ASSERT_EQ(result, buffer + 1); in TEST_F()
58 result = buffer; in TEST_F()
60 ASSERT_EQ(buffer[0], 0 + 0x80); in TEST_F()
61 ASSERT_EQ(buffer[1], 1); in TEST_F()
62 ASSERT_EQ(result, buffer + 2); in TEST_F()
65 result = buffer; in TEST_F()
67 ASSERT_EQ(buffer[0], 1 + 0x80); in TEST_F()
68 ASSERT_EQ(buffer[1], 1); in TEST_F()
69 ASSERT_EQ(result, buffer + 2); in TEST_F()
72 result = buffer; in TEST_F()
74 ASSERT_EQ(buffer[0], 2 + 0x80); in TEST_F()
75 ASSERT_EQ(buffer[1], 1); in TEST_F()
76 ASSERT_EQ(result, buffer + 2); in TEST_F()
79 result = buffer; in TEST_F()
81 ASSERT_EQ(buffer[0], 57 + 0x80); in TEST_F()
82 ASSERT_EQ(buffer[1], 100); in TEST_F()
83 ASSERT_EQ(result, buffer + 2); in TEST_F()
88 leb128::ByteType buffer[2]; in TEST_F() local
92 result = buffer; in TEST_F()
94 ASSERT_EQ(buffer[0], 2); in TEST_F()
95 ASSERT_EQ(result, buffer + 1); in TEST_F()
98 result = buffer; in TEST_F()
100 ASSERT_EQ(buffer[0], 127); in TEST_F()
101 ASSERT_EQ(result, buffer + 1); in TEST_F()
104 result = buffer; in TEST_F()
106 ASSERT_EQ(buffer[0], 0 + 0x80); in TEST_F()
107 ASSERT_EQ(buffer[1], 1); in TEST_F()
108 ASSERT_EQ(result, buffer + 2); in TEST_F()
111 result = buffer; in TEST_F()
113 ASSERT_EQ(buffer[0], 1 + 0x80); in TEST_F()
114 ASSERT_EQ(buffer[1], 1); in TEST_F()
115 ASSERT_EQ(result, buffer + 2); in TEST_F()
118 result = buffer; in TEST_F()
120 ASSERT_EQ(buffer[0], 2 + 0x80); in TEST_F()
121 ASSERT_EQ(buffer[1], 1); in TEST_F()
122 ASSERT_EQ(result, buffer + 2); in TEST_F()
125 result = buffer; in TEST_F()
127 ASSERT_EQ(buffer[0], 57 + 0x80); in TEST_F()
128 ASSERT_EQ(buffer[1], 100); in TEST_F()
129 ASSERT_EQ(result, buffer + 2); in TEST_F()
134 leb128::ByteType buffer[2]; in TEST_F() local
138 result = buffer; in TEST_F()
140 ASSERT_EQ(buffer[0], 2); in TEST_F()
141 ASSERT_EQ(result, buffer + 1); in TEST_F()
144 result = buffer; in TEST_F()
146 ASSERT_EQ(buffer[0], 0x7e); in TEST_F()
147 ASSERT_EQ(result, buffer + 1); in TEST_F()
150 result = buffer; in TEST_F()
152 ASSERT_EQ(buffer[0], 127 + 0x80); in TEST_F()
153 ASSERT_EQ(buffer[1], 0); in TEST_F()
154 ASSERT_EQ(result, buffer + 2); in TEST_F()
157 result = buffer; in TEST_F()
159 ASSERT_EQ(buffer[0], 1 + 0x80); in TEST_F()
160 ASSERT_EQ(buffer[1], 0x7f); in TEST_F()
161 ASSERT_EQ(result, buffer + 2); in TEST_F()
164 result = buffer; in TEST_F()
166 ASSERT_EQ(buffer[0], 0 + 0x80); in TEST_F()
167 ASSERT_EQ(buffer[1], 1); in TEST_F()
168 ASSERT_EQ(result, buffer + 2); in TEST_F()
171 result = buffer; in TEST_F()
173 ASSERT_EQ(buffer[0], 0 + 0x80); in TEST_F()
174 ASSERT_EQ(buffer[1], 0x7f); in TEST_F()
175 ASSERT_EQ(result, buffer + 2); in TEST_F()
178 result = buffer; in TEST_F()
180 ASSERT_EQ(buffer[0], 1 + 0x80); in TEST_F()
181 ASSERT_EQ(buffer[1], 1); in TEST_F()
182 ASSERT_EQ(result, buffer + 2); in TEST_F()
185 result = buffer; in TEST_F()
187 ASSERT_EQ(buffer[0], 0x7f + 0x80); in TEST_F()
188 ASSERT_EQ(buffer[1], 0x7e); in TEST_F()
189 ASSERT_EQ(result, buffer + 2); in TEST_F()
194 leb128::ByteType buffer[2]; in TEST_F() local
197 buffer[0] = 2; in TEST_F()
198 buffer[1] = 0; in TEST_F()
199 ASSERT_TRUE(leb128::decode<uint64_t>(buffer, size) == 2); in TEST_F()
202 buffer[0] = 127; in TEST_F()
203 buffer[1] = 0; in TEST_F()
204 ASSERT_TRUE(leb128::decode<uint64_t>(buffer, size) == 127); in TEST_F()
207 buffer[0] = 0 + 0x80; in TEST_F()
208 buffer[1] = 1; in TEST_F()
209 ASSERT_TRUE(leb128::decode<uint64_t>(buffer, size) == 128); in TEST_F()
212 buffer[0] = 1 + 0x80; in TEST_F()
213 buffer[1] = 1; in TEST_F()
214 ASSERT_TRUE(leb128::decode<uint64_t>(buffer, size) == 129); in TEST_F()
217 buffer[0] = 2 + 0x80; in TEST_F()
218 buffer[1] = 1; in TEST_F()
219 ASSERT_TRUE(leb128::decode<uint64_t>(buffer, size) == 130); in TEST_F()
222 buffer[0] = 57 + 0x80; in TEST_F()
223 buffer[1] = 100; in TEST_F()
224 ASSERT_TRUE(leb128::decode<uint64_t>(buffer, size) == 12857); in TEST_F()
229 leb128::ByteType buffer[2]; in TEST_F() local
232 buffer[0] = 2; in TEST_F()
233 buffer[1] = 0; in TEST_F()
234 ASSERT_EQ(leb128::decode<int64_t>(buffer, size), 2); in TEST_F()
237 buffer[0] = 0x7e; in TEST_F()
238 buffer[1] = 0; in TEST_F()
239 ASSERT_EQ(leb128::decode<int64_t>(buffer, size), -2); in TEST_F()
242 buffer[0] = 127 + 0x80; in TEST_F()
243 buffer[1] = 0; in TEST_F()
244 ASSERT_EQ(leb128::decode<int64_t>(buffer, size), 127); in TEST_F()
247 buffer[0] = 1 + 0x80; in TEST_F()
248 buffer[1] = 0x7f; in TEST_F()
249 ASSERT_EQ(leb128::decode<int64_t>(buffer, size), -127); in TEST_F()
252 buffer[0] = 0 + 0x80; in TEST_F()
253 buffer[1] = 1; in TEST_F()
254 ASSERT_EQ(leb128::decode<int64_t>(buffer, size), 128); in TEST_F()
257 buffer[0] = 0 + 0x80; in TEST_F()
258 buffer[1] = 0x7f; in TEST_F()
259 ASSERT_EQ(leb128::decode<int64_t>(buffer, size), -128); in TEST_F()
262 buffer[0] = 1 + 0x80; in TEST_F()
263 buffer[1] = 1; in TEST_F()
264 ASSERT_EQ(leb128::decode<int64_t>(buffer, size), 129); in TEST_F()
267 buffer[0] = 0x7f + 0x80; in TEST_F()
268 buffer[1] = 0x7e; in TEST_F()
269 ASSERT_EQ(leb128::decode<int64_t>(buffer, size), -129); in TEST_F()
295 leb128::ByteType buffer[5]; in TEST_F() local
299 result = buffer; in TEST_F()
301 ASSERT_EQ(buffer[0], 0); in TEST_F()
302 ASSERT_EQ(result, buffer + 1); in TEST_F()
305 result = buffer; in TEST_F()
307 ASSERT_EQ(buffer[0], 0); in TEST_F()
308 ASSERT_EQ(result, buffer + 1); in TEST_F()
311 result = buffer; in TEST_F()
313 ASSERT_EQ(buffer[0], 1); in TEST_F()
314 ASSERT_EQ(result, buffer + 1); in TEST_F()
317 result = buffer; in TEST_F()
319 ASSERT_EQ(buffer[0], 1); in TEST_F()
320 ASSERT_EQ(result, buffer + 1); in TEST_F()
323 result = buffer; in TEST_F()
325 ASSERT_EQ(buffer[0], 0x80); in TEST_F()
326 ASSERT_EQ(buffer[1], 0x7f); in TEST_F()
327 ASSERT_EQ(result, buffer + 2); in TEST_F()
330 result = buffer; in TEST_F()
332 ASSERT_EQ(buffer[0], 0x80); in TEST_F()
333 ASSERT_EQ(buffer[1], 0x7f); in TEST_F()
334 ASSERT_EQ(result, buffer + 2); in TEST_F()
337 result = buffer; in TEST_F()
339 ASSERT_EQ(buffer[0], 0xb4); in TEST_F()
340 ASSERT_EQ(buffer[1], 0x07); in TEST_F()
341 ASSERT_EQ(result, buffer + 2); in TEST_F()
344 result = buffer; in TEST_F()
346 ASSERT_EQ(buffer[0], 0xb4); in TEST_F()
347 ASSERT_EQ(buffer[1], 0x07); in TEST_F()
348 ASSERT_EQ(result, buffer + 2); in TEST_F()
351 result = buffer; in TEST_F()
353 ASSERT_EQ(buffer[0], 0x8c); in TEST_F()
354 ASSERT_EQ(buffer[1], 0x08); in TEST_F()
355 ASSERT_EQ(result, buffer + 2); in TEST_F()
358 result = buffer; in TEST_F()
360 ASSERT_EQ(buffer[0], 0x8c); in TEST_F()
361 ASSERT_EQ(buffer[1], 0x08); in TEST_F()
362 ASSERT_EQ(result, buffer + 2); in TEST_F()
365 result = buffer; in TEST_F()
367 ASSERT_EQ(buffer[0], 0xff); in TEST_F()
368 ASSERT_EQ(buffer[1], 0xff); in TEST_F()
369 ASSERT_EQ(buffer[2], 0xff); in TEST_F()
370 ASSERT_EQ(buffer[3], 0xff); in TEST_F()
371 ASSERT_EQ(buffer[4], 0xf); in TEST_F()
372 ASSERT_EQ(result, buffer + 5); in TEST_F()
375 result = buffer; in TEST_F()
377 ASSERT_EQ(buffer[0], 0xff); in TEST_F()
378 ASSERT_EQ(buffer[1], 0xff); in TEST_F()
379 ASSERT_EQ(buffer[2], 0xff); in TEST_F()
380 ASSERT_EQ(buffer[3], 0xff); in TEST_F()
381 ASSERT_EQ(buffer[4], 0xf); in TEST_F()
382 ASSERT_EQ(result, buffer + 5); in TEST_F()
412 leb128::ByteType buffer[5]; in TEST_F() local
416 result = buffer; in TEST_F()
418 ASSERT_EQ(buffer[0], 0); in TEST_F()
419 ASSERT_EQ(result, buffer + 1); in TEST_F()
422 result = buffer; in TEST_F()
424 ASSERT_EQ(buffer[0], 0); in TEST_F()
425 ASSERT_EQ(result, buffer + 1); in TEST_F()
428 result = buffer; in TEST_F()
430 ASSERT_EQ(buffer[0], 1); in TEST_F()
431 ASSERT_EQ(result, buffer + 1); in TEST_F()
434 result = buffer; in TEST_F()
436 ASSERT_EQ(buffer[0], 1); in TEST_F()
437 ASSERT_EQ(result, buffer + 1); in TEST_F()
440 result = buffer; in TEST_F()
442 ASSERT_EQ(buffer[0], 0x7f); in TEST_F()
443 ASSERT_EQ(result, buffer + 1); in TEST_F()
446 result = buffer; in TEST_F()
448 ASSERT_EQ(buffer[0], 0x7f); in TEST_F()
449 ASSERT_EQ(result, buffer + 1); in TEST_F()
454 leb128::ByteType buffer[9]; in TEST_F() local
464 result = buffer; in TEST_F()
466 ASSERT_EQ(result, buffer + encode_size); in TEST_F()
467 ASSERT_EQ(leb128::decode<uint64_t>(buffer, decode_size), value); in TEST_F()
471 result = buffer; in TEST_F()
473 ASSERT_EQ(result, buffer + encode_size); in TEST_F()
474 ASSERT_EQ(leb128::decode<uint64_t>(buffer, decode_size), value2); in TEST_F()
478 result = buffer; in TEST_F()
480 ASSERT_EQ(result, buffer + encode_size); in TEST_F()
481 ASSERT_EQ(leb128::decode<int64_t>(buffer, decode_size), value3); in TEST_F()
485 result = buffer; in TEST_F()
487 ASSERT_EQ(result, buffer + encode_size); in TEST_F()
488 ASSERT_EQ(leb128::decode<int64_t>(buffer, decode_size), -value3); in TEST_F()
494 leb128::ByteType buffer[5]; in TEST_F() local
498 result = buffer; in TEST_F()
500 ASSERT_EQ(result, buffer + 3); in TEST_F()
501 ASSERT_EQ(buffer[0], 0xd4); in TEST_F()
502 ASSERT_EQ(buffer[1], 0xb6); in TEST_F()
503 ASSERT_EQ(buffer[2], 0x9); in TEST_F()
505 ASSERT_TRUE(leb128::decode<uint64_t>(buffer, size) == 154452); in TEST_F()
510 char buffer[5]; in TEST_F() local
514 result = buffer; in TEST_F()
516 ASSERT_EQ(result, buffer + 3); in TEST_F()
517 ASSERT_EQ(buffer[0], '\xd4'); in TEST_F()
518 ASSERT_EQ(buffer[1], '\xb6'); in TEST_F()
519 ASSERT_EQ(buffer[2], '\x09'); in TEST_F()
521 ASSERT_TRUE(leb128::decode<uint64_t>(buffer, size) == 154452); in TEST_F()
524 const char* p = buffer; in TEST_F()
526 ASSERT_TRUE(p == (buffer + 3)); in TEST_F()