Lines Matching refs:expected

117             std::vector<uint8_t> expected = {0xc0};
119 CHECK(result == expected);
131 std::vector<uint8_t> expected = {0xc3};
133 CHECK(result == expected);
143 std::vector<uint8_t> expected = {0xc2};
145 CHECK(result == expected);
169 // create expected byte vector
170 std::vector<uint8_t> expected;
171 expected.push_back(static_cast<uint8_t>(i));
175 CHECK(result == expected);
200 // create expected byte vector
201 std::vector<uint8_t> expected;
202 expected.push_back(static_cast<uint8_t>(i));
206 CHECK(result == expected);
231 // create expected byte vector
232 std::vector<uint8_t> expected;
233 expected.push_back(0xcc);
234 expected.push_back(static_cast<uint8_t>(i));
238 CHECK(result == expected);
265 // create expected byte vector
266 std::vector<uint8_t> expected;
267 expected.push_back(0xcd);
268 expected.push_back(static_cast<uint8_t>((i >> 8) & 0xff));
269 expected.push_back(static_cast<uint8_t>(i & 0xff));
273 CHECK(result == expected);
303 // create expected byte vector
304 std::vector<uint8_t> expected;
305 expected.push_back(0xce);
306 expected.push_back(static_cast<uint8_t>((i >> 24) & 0xff));
307 expected.push_back(static_cast<uint8_t>((i >> 16) & 0xff));
308 expected.push_back(static_cast<uint8_t>((i >> 8) & 0xff));
309 expected.push_back(static_cast<uint8_t>(i & 0xff));
313 CHECK(result == expected);
346 // create expected byte vector
347 std::vector<uint8_t> expected;
348 expected.push_back(0xcf);
349 expected.push_back(static_cast<uint8_t>((i >> 070) & 0xff));
350 expected.push_back(static_cast<uint8_t>((i >> 060) & 0xff));
351 expected.push_back(static_cast<uint8_t>((i >> 050) & 0xff));
352 expected.push_back(static_cast<uint8_t>((i >> 040) & 0xff));
353 expected.push_back(static_cast<uint8_t>((i >> 030) & 0xff));
354 expected.push_back(static_cast<uint8_t>((i >> 020) & 0xff));
355 expected.push_back(static_cast<uint8_t>((i >> 010) & 0xff));
356 expected.push_back(static_cast<uint8_t>(i & 0xff));
360 CHECK(result == expected);
393 // create expected byte vector
394 std::vector<uint8_t> expected;
395 expected.push_back(0xd0);
396 expected.push_back(static_cast<uint8_t>(i));
400 CHECK(result == expected);
416 std::vector<uint8_t> expected = {0xd1, 0xdb, 0xd1};
419 CHECK(result == expected);
441 // create expected byte vector
442 std::vector<uint8_t> expected;
443 expected.push_back(0xd1);
444 expected.push_back(static_cast<uint8_t>((i >> 8) & 0xff));
445 expected.push_back(static_cast<uint8_t>(i & 0xff));
449 CHECK(result == expected);
481 // create expected byte vector
482 std::vector<uint8_t> expected;
483 expected.push_back(0xd2);
484 expected.push_back(static_cast<uint8_t>((i >> 24) & 0xff));
485 expected.push_back(static_cast<uint8_t>((i >> 16) & 0xff));
486 expected.push_back(static_cast<uint8_t>((i >> 8) & 0xff));
487 expected.push_back(static_cast<uint8_t>(i & 0xff));
491 CHECK(result == expected);
523 // create expected byte vector
524 std::vector<uint8_t> expected;
525 expected.push_back(0xd3);
526 expected.push_back(static_cast<uint8_t>((i >> 070) & 0xff));
527 expected.push_back(static_cast<uint8_t>((i >> 060) & 0xff));
528 expected.push_back(static_cast<uint8_t>((i >> 050) & 0xff));
529 expected.push_back(static_cast<uint8_t>((i >> 040) & 0xff));
530 expected.push_back(static_cast<uint8_t>((i >> 030) & 0xff));
531 expected.push_back(static_cast<uint8_t>((i >> 020) & 0xff));
532 expected.push_back(static_cast<uint8_t>((i >> 010) & 0xff));
533 expected.push_back(static_cast<uint8_t>(i & 0xff));
537 CHECK(result == expected);
573 // create expected byte vector
574 std::vector<uint8_t> expected;
575 expected.push_back(static_cast<uint8_t>(i));
579 CHECK(result == expected);
603 // create expected byte vector
604 std::vector<uint8_t> expected;
605 expected.push_back(0xcc);
606 expected.push_back(static_cast<uint8_t>(i));
610 CHECK(result == expected);
636 // create expected byte vector
637 std::vector<uint8_t> expected;
638 expected.push_back(0xcd);
639 expected.push_back(static_cast<uint8_t>((i >> 8) & 0xff));
640 expected.push_back(static_cast<uint8_t>(i & 0xff));
644 CHECK(result == expected);
673 // create expected byte vector
674 std::vector<uint8_t> expected;
675 expected.push_back(0xce);
676 expected.push_back(static_cast<uint8_t>((i >> 24) & 0xff));
677 expected.push_back(static_cast<uint8_t>((i >> 16) & 0xff));
678 expected.push_back(static_cast<uint8_t>((i >> 8) & 0xff));
679 expected.push_back(static_cast<uint8_t>(i & 0xff));
683 CHECK(result == expected);
715 // create expected byte vector
716 std::vector<uint8_t> expected;
717 expected.push_back(0xcf);
718 expected.push_back(static_cast<uint8_t>((i >> 070) & 0xff));
719 expected.push_back(static_cast<uint8_t>((i >> 060) & 0xff));
720 expected.push_back(static_cast<uint8_t>((i >> 050) & 0xff));
721 expected.push_back(static_cast<uint8_t>((i >> 040) & 0xff));
722 expected.push_back(static_cast<uint8_t>((i >> 030) & 0xff));
723 expected.push_back(static_cast<uint8_t>((i >> 020) & 0xff));
724 expected.push_back(static_cast<uint8_t>((i >> 010) & 0xff));
725 expected.push_back(static_cast<uint8_t>(i & 0xff));
729 CHECK(result == expected);
757 std::vector<uint8_t> expected =
762 CHECK(result == expected);
774 std::vector<uint8_t> expected =
779 CHECK(result == expected);
791 std::vector<uint8_t> expected =
796 CHECK(result == expected);
827 // create expected byte vector
828 std::vector<uint8_t> expected;
829 expected.push_back(first_bytes[N]);
832 expected.push_back('x');
840 CHECK(result == expected);
864 // create expected byte vector
865 std::vector<uint8_t> expected;
866 expected.push_back(0xd9);
867 expected.push_back(static_cast<uint8_t>(N));
870 expected.push_back('x');
875 CHECK(result == expected);
899 // create expected byte vector (hack: create string first)
900 std::vector<uint8_t> expected(N, 'x');
902 expected.insert(expected.begin(), static_cast<uint8_t>(N & 0xff));
903 expected.insert(expected.begin(), static_cast<uint8_t>((N >> 8) & 0xff));
904 expected.insert(expected.begin(), 0xda);
908 CHECK(result == expected);
932 // create expected byte vector (hack: create string first)
933 std::vector<uint8_t> expected(N, 'x');
935 expected.insert(expected.begin(), static_cast<uint8_t>(N & 0xff));
936 expected.insert(expected.begin(), static_cast<uint8_t>((N >> 8) & 0xff));
937 expected.insert(expected.begin(), static_cast<uint8_t>((N >> 16) & 0xff));
938 expected.insert(expected.begin(), static_cast<uint8_t>((N >> 24) & 0xff));
939 expected.insert(expected.begin(), 0xdb);
943 CHECK(result == expected);
960 std::vector<uint8_t> expected = {0x90};
962 CHECK(result == expected);
972 std::vector<uint8_t> expected = {0x91, 0xc0};
974 CHECK(result == expected);
984 std::vector<uint8_t> expected = {0x95, 0x01, 0x02, 0x03, 0x04, 0x05};
986 CHECK(result == expected);
996 std::vector<uint8_t> expected = {0x91, 0x91, 0x91, 0x90};
998 CHECK(result == expected);
1008 std::vector<uint8_t> expected(j.size() + 3, 0xc0); // all null
1009 expected[0] = 0xdc; // array 16
1010 expected[1] = 0x00; // size (0x0010), byte 0
1011 expected[2] = 0x10; // size (0x0010), byte 1
1013 CHECK(result == expected);
1023 std::vector<uint8_t> expected(j.size() + 5, 0xc0); // all null
1024 expected[0] = 0xdd; // array 32
1025 expected[1] = 0x00; // size (0x00100000), byte 0
1026 expected[2] = 0x01; // size (0x00100000), byte 1
1027 expected[3] = 0x00; // size (0x00100000), byte 2
1028 expected[4] = 0x00; // size (0x00100000), byte 3
1030 //CHECK(result == expected);
1032 CHECK(result.size() == expected.size());
1033 for (size_t i = 0; i < expected.size(); ++i)
1036 CHECK(result[i] == expected[i]);
1050 std::vector<uint8_t> expected = {0x80};
1052 CHECK(result == expected);
1062 std::vector<uint8_t> expected = {0x81, 0xa0, 0xc0};
1064 CHECK(result == expected);
1074 std::vector<uint8_t> expected =
1079 CHECK(result == expected);
1095 // Checking against an expected vector byte by byte is
1124 // Checking against an expected vector byte by byte is
1156 // create expected byte vector
1157 std::vector<uint8_t> expected;
1161 expected.push_back(static_cast<std::uint8_t>(0xD4));
1164 expected.push_back(static_cast<std::uint8_t>(0xD5));
1167 expected.push_back(static_cast<std::uint8_t>(0xD6));
1170 expected.push_back(static_cast<std::uint8_t>(0xD7));
1173 expected.push_back(static_cast<std::uint8_t>(0xD8));
1176 expected.push_back(static_cast<std::uint8_t>(0xC7));
1177 expected.push_back(static_cast<std::uint8_t>(N));
1180 expected.push_back(subtype);
1184 expected.push_back(0x78);
1189 CHECK(result == expected);
1231 // create expected byte vector (hack: create string first)
1232 std::vector<uint8_t> expected(N, 'x');
1234 expected.insert(expected.begin(), subtype);
1235 expected.insert(expected.begin(), static_cast<uint8_t>(N & 0xff));
1236 expected.insert(expected.begin(), static_cast<uint8_t>((N >> 8) & 0xff));
1237 expected.insert(expected.begin(), 0xC8);
1241 CHECK(result == expected);
1267 // create expected byte vector (hack: create string first)
1268 std::vector<uint8_t> expected(N, 'x');
1270 expected.insert(expected.begin(), subtype);
1271 expected.insert(expected.begin(), static_cast<uint8_t>(N & 0xff));
1272 expected.insert(expected.begin(), static_cast<uint8_t>((N >> 8) & 0xff));
1273 expected.insert(expected.begin(), static_cast<uint8_t>((N >> 16) & 0xff));
1274 expected.insert(expected.begin(), static_cast<uint8_t>((N >> 24) & 0xff));
1275 expected.insert(expected.begin(), 0xC9);
1279 CHECK(result == expected);
1303 // create expected byte vector
1304 std::vector<std::uint8_t> expected;
1305 expected.push_back(static_cast<std::uint8_t>(0xC4));
1306 expected.push_back(static_cast<std::uint8_t>(N));
1309 expected.push_back(0x78);
1314 CHECK(result == expected);
1341 // create expected byte vector (hack: create string first)
1342 std::vector<std::uint8_t> expected(N, 'x');
1344 expected.insert(expected.begin(), static_cast<std::uint8_t>(N & 0xff));
1345 expected.insert(expected.begin(), static_cast<std::uint8_t>((N >> 8) & 0xff));
1346 expected.insert(expected.begin(), 0xC5);
1350 CHECK(result == expected);
1374 // create expected byte vector (hack: create string first)
1375 std::vector<uint8_t> expected(N, 'x');
1377 expected.insert(expected.begin(), static_cast<std::uint8_t>(N & 0xff));
1378 expected.insert(expected.begin(), static_cast<std::uint8_t>((N >> 8) & 0xff));
1379 expected.insert(expected.begin(), static_cast<std::uint8_t>((N >> 16) & 0xff));
1380 expected.insert(expected.begin(), static_cast<std::uint8_t>((N >> 24) & 0xff));
1381 expected.insert(expected.begin(), 0xC6);
1385 CHECK(result == expected);
1508 CHECK_THROWS_WITH_AS(_ = json::from_msgpack(std::vector<uint8_t>({0x81, 0xff, 0x01})), "[json.exception.parse_error.113] parse error at byte 2: syntax error while parsing MessagePack string: expected length specification (0xA0-0xBF, 0xD9-0xDB); last byte: 0xFF", json::parse_error&);
1524 CHECK_THROWS_WITH_AS(_ = json::from_msgpack(vec), "[json.exception.parse_error.110] parse error at byte 2: syntax error while parsing MessagePack value: expected end of input; last byte: 0xC0", json::parse_error&);