summaryrefslogtreecommitdiffhomepage
path: root/tests/fix_basic
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-04 06:14:14 -0500
committerAmlal El Mahrouss <amlal@nekernel.org>2025-12-04 06:14:14 -0500
commite85b8a1cf1624a9cbf3d719dd202ad57d43c2f4b (patch)
tree89f7c1d07eed253f97141102041d70b12dfcd48e /tests/fix_basic
parentd43fed8fb9eb369adc70a57bc2a9552d36485241 (diff)
chore: modularize OCL to OCL.core, upcoming OCL.fix
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'tests/fix_basic')
-rw-r--r--tests/fix_basic/CMakeLists.txt23
-rw-r--r--tests/fix_basic/fix_test.cc38
2 files changed, 0 insertions, 61 deletions
diff --git a/tests/fix_basic/CMakeLists.txt b/tests/fix_basic/CMakeLists.txt
deleted file mode 100644
index b94e3b5..0000000
--- a/tests/fix_basic/CMakeLists.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-cmake_minimum_required(VERSION 3.10)
-project(FIXTestBasic)
-
-include(FetchContent)
-FetchContent_Declare(
- googletest
- URL https://github.com/google/googletest/archive/refs/tags/v1.14.0.zip
-)
-
-# For Windows: Prevent overriding the parent project's compiler/linker settings
-set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
-FetchContent_MakeAvailable(googletest)
-
-enable_testing()
-
-add_executable(FIXTestBasic fix_test.cc)
-target_link_libraries(FIXTestBasic gtest_main)
-
-set_property(TARGET FIXTestBasic PROPERTY CXX_STANDARD 20)
-target_include_directories(FIXTestBasic PUBLIC ../../include/ocl)
-
-include(GoogleTest)
-gtest_discover_tests(FIXTestBasic)
diff --git a/tests/fix_basic/fix_test.cc b/tests/fix_basic/fix_test.cc
deleted file mode 100644
index fdffc9b..0000000
--- a/tests/fix_basic/fix_test.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * File: tests/fix_test.cc
- * Purpose: Custom FIX protocol tests.
- * Author: Amlal El Mahrouss (amlal@nekernel.org)
- * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License.
- */
-
-#include <fix/parser.hpp>
-#include <gtest/gtest.h>
-
-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 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");
-}