3 #include <boost/test/unit_test.hpp> 11 BOOST_CHECK_EQUAL(
true, std::is_pod<order_executed_message>::value);
14 char const buf[] = u8
"\x1A" 17 "\x05\x40\x5B\x77\x8F\x56\x1D\x0B" 19 "\x34\x2B\x46\xE0\xBB\x00\x00\x00" 22 BOOST_REQUIRE_EQUAL(
sizeof(buf) - 1,
sizeof(msg));
23 std::memcpy(&msg, buf,
sizeof(msg));
24 BOOST_CHECK_EQUAL(
int(msg.
length.value()), 26);
27 BOOST_CHECK_EQUAL(msg.
order_id.value(), 0x0B1D568F775B4005ULL);
29 BOOST_CHECK_EQUAL(msg.
execution_id.value(), 0x000000BBE0462B34ULL);
31 std::ostringstream os;
34 os.str(), std::string(
"length=26,message_type=35,time_offset=447000" 35 ",order_id=800891482924597253,executed_quantity=100" 36 ",execution_id=806921579316"));
boost::endian::little_uint64_buf_t order_id
boost::endian::little_uint8_buf_t length
boost::endian::little_uint32_buf_t time_offset
BOOST_AUTO_TEST_CASE(decode_order_executed_message)
boost::endian::little_uint8_buf_t message_type
boost::endian::little_uint64_buf_t execution_id
Represent the 'Order Executed' message in the PITCH-2.X protocol.
boost::endian::little_uint32_buf_t executed_quantity