summaryrefslogtreecommitdiff
path: root/modules/gdscript/tests/gdscript_test_runner.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-31 10:53:28 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-31 10:53:28 +0100
commitb6a8b8e8f732bcec77f02f20d9c788ecd02992cf (patch)
treec2264b16d251b33bd27904d11783bb19808b1b9d /modules/gdscript/tests/gdscript_test_runner.h
parentae2d2ce407eec4deaf306fad28e6f3ae84bda8bb (diff)
parent199e5dbb1ed1f51098b8c015b0ad36462287a48b (diff)
Merge pull request #72212 from anvilfolk/gdtestnames
Add option to print filenames in GDScript unit testing
Diffstat (limited to 'modules/gdscript/tests/gdscript_test_runner.h')
-rw-r--r--modules/gdscript/tests/gdscript_test_runner.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gdscript/tests/gdscript_test_runner.h b/modules/gdscript/tests/gdscript_test_runner.h
index b097f1b485..60b48c6a57 100644
--- a/modules/gdscript/tests/gdscript_test_runner.h
+++ b/modules/gdscript/tests/gdscript_test_runner.h
@@ -92,6 +92,7 @@ public:
bool generate_output();
const String &get_source_file() const { return source_file; }
+ const String get_source_relative_filepath() const { return source_file.trim_prefix(base_dir); }
const String &get_output_file() const { return output_file; }
GDScriptTest(const String &p_source_path, const String &p_output_path, const String &p_base_dir);
@@ -105,6 +106,7 @@ class GDScriptTestRunner {
bool is_generating = false;
bool do_init_languages = false;
+ bool print_filenames; // Whether filenames should be printed when generated/running tests
bool make_tests();
bool make_tests_for_dir(const String &p_dir);
@@ -117,7 +119,7 @@ public:
int run_tests();
bool generate_outputs();
- GDScriptTestRunner(const String &p_source_dir, bool p_init_language);
+ GDScriptTestRunner(const String &p_source_dir, bool p_init_language, bool p_print_filenames = false);
~GDScriptTestRunner();
};