Archipelago/test/cpp
..
intset
CMakeLists.txt
README.md

README.md

C++ tests

Test framework for C and C++ code in AP.

Adding a Test

GoogleTest

Adding GoogleTests is as simple as creating a directory with

  • one or more test_*.cpp files that define tests using GoogleTest API
  • a CMakeLists.txt that adds the .cpp files to test_default target using target_sources

CTest

If either GoogleTest is not suitable for the test or the build flags / sources / libraries are incompatible, you can add another CTest to the project using add_target and add_test, similar to how it's done for test_default.

Running Tests