All tests for the SDK are contained and managed here.
The excellent external Catch2 testing framework is used.
https://github.com/catchorg/Catch2
tag: v2.13.9
Commit: b1b5cb812277f367387844aab46eb2d3b15d03cd
Do one of the following:
- Put the file in the corresponding component folder within the one folder. For example "tests/one/arcus/arcus.cpp" if adding a test for something within "one/arcus/..".
- Name the file after a header that is being tests, e.g. "ring.cpp" if testing "one/arcus/internal/ring.h".
- If the testing a Fake Game with a Fake Agent, add it to tests/integration.cpp.
- Integration tests should only reference public interfaces. No friend classes for testing purposes or touching of /internal folders.
Test utilities go in tests/one/arcus/util.h
and eventually in tests/one/ping/util.h
.