3 #include <boost/test/unit_test.hpp> 16 char const buf[] = u8
"\x28" 19 "\x05\x40\x5B\x77\x8F\x56\x1D\x0B" 22 "\x5A\x56\x5A\x5A\x54\x20\x20\x20" 23 "\x5A\x23\x00\x00\x00\x00\x00\x00" 28 BOOST_CHECK_EQUAL(
sizeof(buf) - 1,
sizeof(msg));
31 reinterpret_cast<char*>(&msg),
34 std::memcpy(&msg, buf,
sizeof(msg));
35 BOOST_CHECK_EQUAL(
int(msg.
length.value()), 40);
38 BOOST_CHECK_EQUAL(msg.
order_id.value(), 0x0B1D568F775B4005ULL);
40 BOOST_CHECK_EQUAL(msg.
quantity.value(), 20000);
42 BOOST_CHECK_EQUAL(msg.
price.value(), 9050);
43 BOOST_CHECK_EQUAL(msg.
add_flags.value(), 0x01);
46 std::ostringstream os;
50 std::string(
"length=40,message_type=47,time_offset=447000," 51 "order_id=800891482924597253,side_indicator=B," 52 "quantity=20000,symbol=ZVZZT ,price=9050,add_flags=1," 53 "participant_id=MPID"));
BOOST_AUTO_TEST_CASE(expanded_add_order_message_basic)
boost::endian::little_uint8_buf_t side_indicator
boost::endian::little_uint32_buf_t time_offset
Represent the 'Add Order' message in the PITCH-2.X protocol.
participant_type participant_id
boost::endian::little_uint8_buf_t message_type
boost::endian::little_uint8_buf_t length
boost::endian::little_uint64_buf_t order_id
boost::endian::little_uint8_buf_t add_flags