MCPcopy Create free account
hub / github.com/boostorg/json / testLoadLittleEndian

Method testLoadLittleEndian

test/utf8.cpp:21–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19{
20public:
21 void
22 testLoadLittleEndian()
23 {
24 BOOST_TEST(
25 detail::load_little_endian<4>("\x01\x02\x03\x04\xFF")
26 == 0x04030201);
27
28 BOOST_TEST(
29 detail::load_little_endian<4>("\x12\x34\x56\x78\xFF")
30 == 0x78563412);
31
32 BOOST_TEST(
33 detail::load_little_endian<4>("\xFE\xDC\xBA\x98\xFF")
34 == 0x98BADCFE);
35
36 BOOST_TEST(
37 detail::load_little_endian<3>("\x12\x45\xFE\xFF")
38 == 0x00FE4512);
39
40 BOOST_TEST(
41 detail::load_little_endian<3>("\xE0\xA0\x80\xFF")
42 == 0x0080A0E0);
43
44 BOOST_TEST(
45 detail::load_little_endian<2>("\x37\xFC\xFF")
46 == 0x0000FC37);
47
48 BOOST_TEST(detail::load_little_endian<1>("\xF1\xFF") == 0x000000F1);
49 }
50
51 void
52 testClassifyUtf8()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected