3 #include <boost/test/unit_test.hpp> 11 BOOST_CHECK_EQUAL(
true, std::is_pod<auction_update_message>::value);
18 "\x5A\x56\x5A\x5A\x54\x20\x20\x20" 20 "\xE8\xA3\x0F\x00\x00\x00\x00\x00" 23 "\xE9\xA3\x0F\x00\x00\x00\x00\x00" 24 "\xEA\xA3\x0F\x00\x00\x00\x00\x00" 27 BOOST_REQUIRE_EQUAL(
sizeof(buf) - 1,
sizeof(msg));
28 std::memcpy(&msg, buf,
sizeof(msg));
29 BOOST_CHECK_EQUAL(
int(msg.
length.value()), 47);
35 BOOST_CHECK_EQUAL(msg.
buy_shares.value(), 75000);
40 std::ostringstream os;
45 "length=47,message_type=149,time_offset=447000,stock_symbol=ZVZZT " 46 ",auction_type=I,reference_price=1025000,buy_shares=75000" 47 ",sell_shares=20000,indicative_price=1025001" 48 ",auction_only_price=1025002"));
boost::endian::little_uint32_buf_t time_offset
boost::endian::little_uint64_buf_t indicative_price
BOOST_AUTO_TEST_CASE(auction_update_message_basic)
boost::endian::little_uint32_buf_t buy_shares
stock_symbol_type stock_symbol
boost::endian::little_uint8_buf_t length
boost::endian::little_uint8_buf_t auction_type
boost::endian::little_uint8_buf_t message_type
boost::endian::little_uint64_buf_t auction_only_price
boost::endian::little_uint32_buf_t sell_shares
Represent the 'Auction Update' message in the PITCH-2.X protocol.
boost::endian::little_uint64_buf_t reference_price