File tree Expand file tree Collapse file tree 4 files changed +72
-0
lines changed
Expand file tree Collapse file tree 4 files changed +72
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ FASTTYPEGEN_TARGET(simple_types11 simple11.xml)
2323FASTTYPEGEN_TARGET(simple_types12 simple12.xml)
2424FASTTYPEGEN_TARGET(simple_types13 simple13.xml)
2525FASTTYPEGEN_TARGET(simple_types14 simple14.xml)
26+ FASTTYPEGEN_TARGET(simple_types15 simple15.xml)
2627
2728
2829FASTTYPEGEN_TARGET(test_types1 test1.xml test2.xml)
@@ -42,6 +43,8 @@ add_executable (mfast_test
4243 encoder_test.cpp
4344 encoder_decoder_test.cpp
4445 encoder_decoder_test_v2.cpp
46+ encoder_decoder_pmap.cpp
47+ encoder_decoder_pmap_v2.cpp
4548 field_comparator_test.cpp
4649 group_encoder_decoder_v2.cpp
4750 group_encoder_decoder.cpp
@@ -66,6 +69,7 @@ add_executable (mfast_test
6669 ${FASTTYPEGEN_simple_types12_OUTPUTS}
6770 ${FASTTYPEGEN_simple_types13_OUTPUTS}
6871 ${FASTTYPEGEN_simple_types14_OUTPUTS}
72+ ${FASTTYPEGEN_simple_types15_OUTPUTS}
6973 fast_type_gen_test.cpp
7074 dictionary_builder_test.cpp
7175 json_test.cpp
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+
6+ #include " simple15.h"
7+
8+ using namespace test ::coding;
9+
10+ TEST_CASE (" full pmap occupied encoder/decoder" ," [full_pmap_occupied_encoder_decoder]" )
11+ {
12+ fast_test_coding_case<simple15::templates_description> test_case;
13+
14+ SECTION (" encode fields" )
15+ {
16+ simple15::Test_1 test_1;
17+ simple15::Test_1_mref test_1_mref = test_1.mref ();
18+ test_1_mref.set_field_1_1 ().as (1 );
19+ test_1_mref.set_field_1_2 ().as (2 );
20+ test_1_mref.set_field_1_3 ().as (3 );
21+ test_1_mref.set_field_1_4 ().as (4 );
22+ test_1_mref.set_field_1_5 ().as (5 );
23+ test_1_mref.set_field_1_6 ().as (6 );
24+ test_1_mref.set_field_1_7 ().as (7 );
25+ REQUIRE (test_case.encoding (test_1.cref ()," \x3F\xC0\x82\x83\x84\x85\x86\x87\x88 " ,true ));
26+ REQUIRE (test_case.decoding (" \x3F\xC0\x82\x83\x84\x85\x86\x87\x88 " ,test_1.cref (),true ));
27+ }
28+ }
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+
6+ #include " simple15.h"
7+
8+ using namespace test ::coding;
9+
10+ TEST_CASE (" full pmap occupied encoder_v2/decoder_v2" ," [full_pmap_occupied_encoder_v2_decoder_v2]" )
11+ {
12+ fast_test_coding_case_v2<simple15::templates_description> test_case;
13+
14+ SECTION (" encode fields" )
15+ {
16+ simple15::Test_1 test_1;
17+ simple15::Test_1_mref test_1_mref = test_1.mref ();
18+ test_1_mref.set_field_1_1 ().as (1 );
19+ test_1_mref.set_field_1_2 ().as (2 );
20+ test_1_mref.set_field_1_3 ().as (3 );
21+ test_1_mref.set_field_1_4 ().as (4 );
22+ test_1_mref.set_field_1_5 ().as (5 );
23+ test_1_mref.set_field_1_6 ().as (6 );
24+ test_1_mref.set_field_1_7 ().as (7 );
25+ REQUIRE (test_case.encoding (test_1.cref ()," \x3F\xC0\x82\x83\x84\x85\x86\x87\x88 " ,true ));
26+ REQUIRE (test_case.decoding (" \x3F\xC0\x82\x83\x84\x85\x86\x87\x88 " ,test_1.cref (),true ));
27+ }
28+ }
Original file line number Diff line number Diff line change 1+ <?xml version =\" 1.0 \" ?>
2+ <templates xmlns =" http://www.fixprotocol.org/ns/fast/td/1.1" >
3+ <template name =" Test_1" id =" 1" >
4+ <uInt32 name =" field_1_1" id =" 11" presence =" optional" ><copy /></uInt32 >
5+ <uInt32 name =" field_1_2" id =" 12" presence =" optional" ><copy /></uInt32 >
6+ <uInt32 name =" field_1_3" id =" 13" presence =" optional" ><copy /></uInt32 >
7+ <uInt32 name =" field_1_4" id =" 14" presence =" optional" ><copy /></uInt32 >
8+ <uInt32 name =" field_1_5" id =" 15" presence =" optional" ><copy /></uInt32 >
9+ <uInt32 name =" field_1_6" id =" 16" presence =" optional" ><copy /></uInt32 >
10+ <uInt32 name =" field_1_7" id =" 17" presence =" optional" ><copy /></uInt32 >
11+ </template >
12+ </templates >
You can’t perform that action at this time.
0 commit comments