summaryrefslogtreecommitdiffhomepage
path: root/tests/fix_basic
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-11-25 00:05:50 -0500
committerGitHub <noreply@github.com>2025-11-25 00:05:50 -0500
commitb9b5224ed9d045437425ad129ffb83b9d0de850c (patch)
tree12c034291fd9d721b1eb9b8c16bcc65285936fe8 /tests/fix_basic
parent92921b0b156d5a8369b9133a7c37e2793954c932 (diff)
parent52399b9b2fe46e29c5ee265baf8cb7f1717a4c53 (diff)
Merge pull request #22 from amlel-el-mahrouss/develop
Expanding FIX and more patches.
Diffstat (limited to 'tests/fix_basic')
-rw-r--r--tests/fix_basic/fix_test.cc17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/fix_basic/fix_test.cc b/tests/fix_basic/fix_test.cc
index f7064b5..122d918 100644
--- a/tests/fix_basic/fix_test.cc
+++ b/tests/fix_basic/fix_test.cc
@@ -5,14 +5,25 @@
* Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License.
*/
-#include <fix/fix.hpp>
+#include <fix/parser.hpp>
#include <tests/hpptest.hpp>
#include <tests/gtest.hpp>
TEST(FIXTest, BasicFIXUsage)
{
- constexpr auto default_fix = "8=FIX.4.2\x01 9=65\x01 35=A\x01 49=SERVER\x01 56=CLIENT\x01 34=177\x01 52=20090107-18:15:16\x01 98=0\x01 108=30\x01 10=062\x01";
-
+ constexpr const char default_fix[] = {
+ '8', '=', 'F', 'I', 'X', '.', '4', '.', '2', 0x01,
+ '9', '=', '6', '3', 0x01, // BodyLength = 63
+ '3', '5', '=', 'A', 0x01,
+ '4', '9', '=', 'S', 'E', 'R', 'V', 'E', 'R', 0x01,
+ '5', '6', '=', 'C', 'L', 'I', 'E', 'N', 'T', 0x01,
+ '3', '4', '=', '1', '7', '7', 0x01,
+ '5', '2', '=', '2', '0', '0', '9', '0', '1', '0', '7', '-', '1', '8', ':', '1', '5', ':', '1', '6', 0x01,
+ '9', '8', '=', '0', 0x01,
+ '1', '0', '8', '=', '3', '0', 0x01,
+ '1', '0', '=', '1', '4', '3', 0x01, 0x00 // CheckSum = 143
+ };
+
ocl::fix::basic_visitor<char> basic_visitor;
ocl::fix::basic_range_data<char> fix = basic_visitor.visit(default_fix);