Files
settled-reach/client/addons/gdUnit4/test/GdUnitScanTestSuiteTest.gd
T
jpmschweitzerandClaude Opus 4.6 61e0762a84 chore(client): add gdUnit4 test framework addon
Vendor gdUnit4 for Godot 4 client testing (D-030).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 16:52:00 +01:00

30 lines
702 B
GDScript

# This test verifys only the scanner functionallity
# to find all given tests by pattern 'func test_<testname>():'
extends GdUnitTestSuite
func test_example() -> void:
assert_str("This is an example message").has_length(26)
assert_str("This is an example message").starts_with("This is an ex")
func test_b() -> void:
pass
# test name starts with same name e.g. test_b vs test_b2
func test_b2() -> void:
pass
# test scanning success with invalid formatting
func test_b21 ( ) -> void:
pass
# finally verify all tests are found
func after() -> void:
assert_array(get_children())\
.extract("test_name")\
.contains_exactly(["test_example", "test_b", "test_b2", "test_b21"])