File tree Expand file tree Collapse file tree
engine_details/architecture Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,21 +102,20 @@ order to skip those kind of tests, run the following command:
102102 Writing tests
103103-------------
104104
105- Test suites represent C++ header files which must be included as part of the
106- main test entry point in ``tests/test_main.cpp ``. Most test suites are located
107- directly under ``tests/ `` directory.
105+ Test suites represent C++ implementation files which must include the ``TEST_FORCE_LINK() `` macro.
106+ Most test suites are located directly under ``tests/ `` directory.
108107
109- All header files are prefixed with ``test_ ``, and this is a naming convention
108+ All test files are prefixed with ``test_ ``, and this is a naming convention
110109which the Godot build system relies on to detect tests throughout the engine.
111110
112111Here's a minimal working test suite with a single test case written:
113112
114113.. code-block :: cpp
115114
116- #pragma once
117-
118115 #include "tests/test_macros.h"
119116
117+ TEST_FORCE_LINK(test_string)
118+
120119 namespace TestString {
121120
122121 TEST_CASE("[String] Hello World!") {
@@ -129,7 +128,6 @@ Here's a minimal working test suite with a single test case written:
129128 .. note ::
130129 You can quickly generate new tests using the ``create_test.py `` script found in the ``tests/ `` directory.
131130 This script automatically creates a new test file with the required boilerplate code in the appropriate location.
132- It's also able to automatically include the new header in ``tests/test_main.cpp `` using invasive mode (``-i `` flag).
133131 To view usage instructions, run the script with the ``-h `` flag.
134132
135133The ``tests/test_macros.h `` header encapsulates everything which is needed for
You can’t perform that action at this time.
0 commit comments