Skip to content

Commit

Permalink
Merge pull request godotengine#9899 from Geometror/note-about-create-…
Browse files Browse the repository at this point in the history
…test-py

Add note about the create_test.py script
  • Loading branch information
skyace65 authored Sep 7, 2024
2 parents aa297fd + b07c27f commit 5980166
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions contributing/development/core_and_modules/unit_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ Here's a minimal working test suite with a single test case written:
#endif // TEST_STRING_H
.. note::
You can quickly generate new tests using the ``create_test.py`` script found in the ``tests/`` directory.
This script automatically creates a new test file with the required boilerplate code in the appropriate location.
It's also able to automatically include the new header in ``tests/test_main.cpp`` using invasive mode (``-i`` flag).
To view usage instructions, run the script with the ``-h`` flag.

The ``tests/test_macros.h`` header encapsulates everything which is needed for
writing C++ unit tests in Godot. It includes doctest assertion and logging
macros such as ``CHECK`` as seen above, and of course the definitions for
Expand Down

0 comments on commit 5980166

Please sign in to comment.