Test task to implement a Trading Engine
trading-engine/
├── CMakeLists.txt
├── src/
│ ├── CMakeLists.txt
│ ├── main.cpp
│ ├── trading_engine.cpp
│ └── trading_engine.hpp
└── tests/
├── CMakeLists.txt
└── test_main.cpp
└── tests.cpp
src/: Contains application's source code.tests/: Contains test source files
-
Configure and Build the Project:
Open a terminal in the project's root directory and execute:
cmake -B build cmake --build build
-
Run the Application:
After building, run the main application with:
chmod +x build/src/trading_engine_main ./build/src/trading_engine_main
-
Run the Tests:
After building, run the tests using:
ctest --test-dir build
This command will execute the tests registered with CTest and display the results.