4 #include <boost/test/unit_test.hpp> 12 using namespace std::chrono;
18 buf.second, buf.first, 0);
21 BOOST_CHECK_EQUAL(x.header.stock_locate, 0);
22 BOOST_CHECK_EQUAL(x.header.tracking_number, 1);
23 BOOST_CHECK_EQUAL(x.header.timestamp.ts.count(),
expected_ts.count());
24 BOOST_CHECK_EQUAL(x.mpid,
"LOOF");
25 BOOST_CHECK_EQUAL(x.stock,
"HSART");
26 BOOST_CHECK_EQUAL(x.primary_market_maker, u
'N');
27 BOOST_CHECK_EQUAL(x.market_maker_mode, u
'N');
28 BOOST_CHECK_EQUAL(x.market_participant_state, u
'A');
31 buf.second, buf.first, 0);
34 BOOST_CHECK_EQUAL(x.header.stock_locate, 0);
35 BOOST_CHECK_EQUAL(x.header.tracking_number, 1);
36 BOOST_CHECK_EQUAL(x.header.timestamp.ts.count(),
expected_ts.count());
37 BOOST_CHECK_EQUAL(x.mpid,
"LOOF");
38 BOOST_CHECK_EQUAL(x.stock,
"HSART");
39 BOOST_CHECK_EQUAL(x.primary_market_maker, u
'N');
40 BOOST_CHECK_EQUAL(x.market_maker_mode, u
'N');
41 BOOST_CHECK_EQUAL(x.market_participant_state, u
'A');
49 using namespace std::chrono;
54 buf.second, buf.first, 0);
55 std::ostringstream os;
58 os.str(),
"message_type=L,stock_locate=0" 59 ",tracking_number=1,timestamp=113231.123456789" 62 ",primary_market_maker=N" 63 ",market_maker_mode=N" 64 ",market_participant_state=A");
static T r(std::size_t size, void const *msg, std::size_t offset)
Read a single message or field.
Contains classes and functions to parse NASDAQ ITCH-5.0 messages, more information about ITCH-5...
static constexpr int message_type
char_list_field< u 'A', u 'E', u 'W', u 'S', u 'D' > market_participant_state_t
Represent the 'Market Participant State' field in a 'Market Participant Position' message...
char_list_field< u 'Y', u 'N'> primary_market_maker_t
Represent the 'Primary Market Maker' field on a 'Market Participant Position' message.
std::pair< char const *, std::size_t > market_participant_position()
BOOST_AUTO_TEST_CASE(decode_market_participant_position_message)
std::chrono::nanoseconds expected_ts()
Return the expected timestamp for all the test messages.
char_list_field< u 'N', u 'P', u 'S', u 'R', u 'L' > market_maker_mode_t
Represent the 'Market Maker Mode' field in a 'Market Participant Position' message.