File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,13 +26,17 @@ FASTTYPEGEN_TARGET(simple_types14 simple14.xml)
2626FASTTYPEGEN_TARGET (simple_types15 simple15.xml )
2727FASTTYPEGEN_TARGET (simple_types16 simple16.xml )
2828
29+ if (XETRA_FAST_SPECIFICATION)
30+ FASTTYPEGEN_TARGET (simple_types17 simple17.xml )
31+ endif (XETRA_FAST_SPECIFICATION )
32+
2933FASTTYPEGEN_TARGET (test_types1 test1.xml test2.xml )
3034FASTTYPEGEN_TARGET (test_types3 test3.xml )
3135FASTTYPEGEN_TARGET (test_types4 test4.xml )
3236FASTTYPEGEN_TARGET (test_types5 test5.xml )
3337FASTTYPEGEN_TARGET (test_scp scp.xml )
3438
35- add_executable ( mfast_test
39+ set (test_sources
3640 test_main.cpp
3741 arena_allocator_test.cpp
3842 field_ref_test.cpp
@@ -87,6 +91,16 @@ add_executable (mfast_test
8791 enum_encoder_decoder.cpp
8892 )
8993
94+ if (XETRA_FAST_SPECIFICATION)
95+ set (test_sources ${test_sources}
96+ ${FASTTYPEGEN_simple_types17_OUTPUTS}
97+ timestamp_encoder_decoder_v2.cpp
98+ timestamp_encoder_decoder.cpp
99+ )
100+ endif (XETRA_FAST_SPECIFICATION )
101+
102+ add_executable (mfast_test ${test_sources} )
103+
90104target_link_libraries (mfast_test
91105 mfast_static
92106 mfast_coder_static
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" ?>
2+ <templates xmlns =" http://www.fixprotocol.org/ns/template-definition"
3+ templateNs =" http://www.fixprotocol.org/ns/templates/sample"
4+ ns =" http://www.fixprotocol.org/ns/fix" >
5+ <template name =" Test_1" id =" 1" >
6+ <uInt32 name =" field1" id =" 11" ><copy /></uInt32 >
7+ <timestamp name =" TransactTime" unit =" nanosecond" id =" 60" presence =" optional" ><copy /></timestamp >
8+ </template >
9+ <template name =" Test_2" id =" 2" >
10+ <uInt32 name =" field4" id =" 21" ><copy /></uInt32 >
11+ <uInt32 name =" field5" id =" 22" ><copy /></uInt32 >
12+ <uInt32 name =" field6" id =" 23" ><copy /></uInt32 >
13+ </template >
14+ </templates >
Original file line number Diff line number Diff line change 1+ #include " catch.hpp"
2+ #include < mfast.h>
3+
4+ #include " fast_test_coding_case.hpp"
5+ #include " byte_stream.h"
6+
7+ #include " simple17.h"
8+
9+ using namespace test ::coding;
10+
11+ TEST_CASE (" timestamp test encoder/decoder" ," [timestamp_encoder_decoder]" )
12+ {
13+ fast_test_coding_case<simple17::templates_description> test_case;
14+ simple17::Test_1 test_1;
15+ simple17::Test_1_mref test_1_mref = test_1.mref ();
16+ test_1_mref.set_field1 ().as (1 );
17+ test_1_mref.set_TransactTime ().as (2 );
18+ REQUIRE (test_case.encoding (test_1.cref ()," \xF0\x81\x81\x83 " ,true ));
19+ REQUIRE (test_case.decoding (" \xF0\x81\x81\x83 " ,test_1.cref (),true ));
20+ }
21+
22+
23+
Original file line number Diff line number Diff line change 1+ #include " catch.hpp"
2+ #include < mfast.h>
3+
4+ #include " fast_test_coding_case_v2.hpp"
5+ #include " byte_stream.h"
6+
7+ #include " simple17.h"
8+
9+ using namespace test ::coding;
10+
11+ TEST_CASE (" timestamp test encoder_V2/decoder_v2" ," [timestamp_encoder_v2_decoder_v2]" )
12+ {
13+ fast_test_coding_case_v2<simple17::templates_description> test_case;
14+ simple17::Test_1 test_1;
15+ simple17::Test_1_mref test_1_mref = test_1.mref ();
16+ test_1_mref.set_field1 ().as (1 );
17+ test_1_mref.set_TransactTime ().as (2 );
18+ REQUIRE (test_case.encoding (test_1.cref ()," \xF0\x81\x81\x83 " ,true ));
19+ REQUIRE (test_case.decoding (" \xF0\x81\x81\x83 " ,test_1.cref (),true ));
20+ }
You can’t perform that action at this time.
0 commit comments