M1b: Brücke und Hülle #6
@@ -2,7 +2,8 @@ extends SceneTree
|
|||||||
## Runs every test script in res://tests whose file name starts with "test_".
|
## Runs every test script in res://tests whose file name starts with "test_".
|
||||||
## Every method whose name starts with "test_" is one test. A test fails if a
|
## Every method whose name starts with "test_" is one test. A test fails if a
|
||||||
## check fails or if an error is reported while it runs, for example a call
|
## check fails or if an error is reported while it runs, for example a call
|
||||||
## on a null value. Exits with code 1 if any test failed.
|
## on a null value. Exits with code 1 if any test failed or if no test ran,
|
||||||
|
## so that a renamed test folder or misnamed tests cannot pass as a clean run.
|
||||||
##
|
##
|
||||||
## From the repository root:
|
## From the repository root:
|
||||||
## godot --headless --path game -s res://tests/run_tests.gd
|
## godot --headless --path game -s res://tests/run_tests.gd
|
||||||
@@ -78,4 +79,4 @@ func _run_all() -> void:
|
|||||||
print(" " + failure)
|
print(" " + failure)
|
||||||
OS.remove_logger(counter)
|
OS.remove_logger(counter)
|
||||||
print("%d passed, %d failed" % [passed, failed])
|
print("%d passed, %d failed" % [passed, failed])
|
||||||
quit(1 if failed > 0 else 0)
|
quit(1 if failed > 0 or passed == 0 else 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user