This is a test task for Bohemia Interactive for a programmer role.
Architecture documentation can be found here
Report with results can be found here
The project is built on top of the CMake project generator. There are two ways to build the project:
- Use an extension for your IDE (CLion / VSCode recommended)
- Use CMake manually to generate the project and then build it with your IDE or command line tools.
There are no external library dependencies, only compiler or CMake bundled.
Required dependencies:
- C++23 compatible compiler (latest
clangandmsvctested) - CMake 3.20 or higher
Recommended dependencies:
- clang toolchain (clang-tidy, clang-format, clangd)
- CLion or VSCode with CMake Tools, clang, and clang-format extensions
- Everything should work out of the box: just open the project in CLion and it will generate the project for you.
- Open the CMake icon in the bottom left corner and press
Reload CMake project. - Choose
BTestAppas the startup project and run it.
- Install the
ms-vscode.cmake-toolsextension. - Open the CMake Tools extension.
- Press the
Delete Cache and Reconfigurebutton. - Choose
BTestAppas the startup project and run it.
- Choose a build system (e.g. Visual Studio, Makefiles, etc.)
- Type in terminal
cmake --helpto see the list of supported generators. - Copy the name of the generator you want to use (e.g. "Visual Studio 17 2022").
- Generate the project for your build system
- Open a terminal in the root folder.
- Run
cmake -S . -B build -G "Visual Studio 17 2022".
- Build generated project
- Run
cmake --build build --config Debugto build the project in Debug configuration. - Go to the
buildfolder and find a corresponding executable file forBTestApp - You can also open the generated solution file in Visual Studio and build it from there.
The project uses clang-tidy and clang-format.
For tests, the CMake default test framework is used.
The project supports clangd, so you can use any IDE with clangd support.
Clang-tidy also runs during a build process.
To check all problems without recompiling the project, you can run clang-tidy with the following command.
This command considers the build folder as the CMake generated project folder.
run-clang-tidy -p buildAdd -fix argument to automatically fix all problems that can be fixed by clang-tidy automaticaly.
run-clang-tidy -p build -fixJust use VSCode or CLion
Before test execution, make sure you have generated and built all modules.
Assuming you generated the project in the build folder, you can run tests with the following command:
ctest --test-dir build