Centipede 0.0.1
Centipede program
Loading...
Searching...
No Matches
Project structure

Infrastructure

There are 5 major components regarding the infrastructure of this project:

  • Documentation
  • Continuous integration
  • Continuous deployment
  • Testing
  • Benchmark

Documentation

Documentation in this project is done via Doxygen, a very popular documentation tool for C and C++ projects. It is then modified by Doxygen-awesome to improve the aesthetic of the documentation. The main configuration file for the doxygen is in this CMakeLists.txt, where all CMake variables with the prefix DOXYGEN_ will be used as the doxygen configuration options. To build the documentation, enable -DBUILD_DOC during the CMake configuration and build the target named "doxygen":

$ cmake --preset default -DBUILD_DOC=ON
$ cd build
$ ninja doxygen

The index.html will be in build/doc/html folder.

Continuous integration (CI)

Continuous deployment (CD)

Testing

All testing files are in the test folder. Generally, testings can be categorized into unit tests and the integration tests (there are other types of testing). Unit tests are meant to test each public API of a class while integration tests are meant to test whether all components of the software work well. In this project, unit tests are done via googletest and integration tests are done via ctest (from CMake).

Unit tests

To add a new unit test, first create a new .cpp file in test/unit_tests folder. Create a test function with a test suite name and a test name, e.g.:

#include <gtest/gtest.h>
TEST(test_suite_name, test_name)
{
// doing tests here
}

Benchmark

Not yet implemented ...