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>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# 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"])
|
||||
Reference in New Issue
Block a user