From 8e02c3657a10fad64dcde67ec3e6fb68eb543e2f Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 1 Dec 2025 02:56:53 -0500 Subject: chore: new set of tests for FIX. Signed-off-by: Amlal El Mahrouss --- tests/fix_basic/fix_test.cc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/fix_basic/fix_test.cc b/tests/fix_basic/fix_test.cc index f98a2c2..fdffc9b 100644 --- a/tests/fix_basic/fix_test.cc +++ b/tests/fix_basic/fix_test.cc @@ -21,10 +21,18 @@ constexpr const char default_fix[] = { '1', '0', '=', '1', '4', '3', 0x01, 0x00 // CheckSum = 143 }; -TEST(FIXTest, BasicFIXUsage) -{ - ocl::fix::basic_visitor basic_visitor; - ocl::fix::basic_range_data fix = basic_visitor.visit(default_fix); +ocl::fix::basic_visitor basic_visitor; +ocl::fix::basic_range_data fix = basic_visitor.visit(default_fix); +TEST(FIXTest, FIX1) +{ EXPECT_TRUE(fix.is_valid()); + EXPECT_TRUE(fix["35"].empty() == false && fix["35"] == "A"); + EXPECT_TRUE(fix["49"].empty() == false && fix["49"] == "SERVER"); +} + +TEST(FIXTest, FIX2) +{ + EXPECT_TRUE(fix["133"].empty() == true && fix["133"] != ""); + EXPECT_TRUE(fix["49"].empty() == false && fix["49"] != "A"); } -- cgit v1.2.3