From 579342810f5c453e91063c54ca6544300ea09090 Mon Sep 17 00:00:00 2001 From: RevoluPowered Date: Mon, 20 Jul 2020 17:35:34 +0100 Subject: t Add unit testing to Godot using DocTest and added to GitHub Actions CI Implements exit codes into the engine so tests can return their statuses. Ideally we don't do this, and we use FIXUP logic to 'begin' and 'end' the engine execution for tests specifically. Since realistically we're initialising the engine here we don't want to do that, since String should not require an engine startup to test a single header. This lowers the complexity of running the unit tests and even for physics should be possible to implement such a fix. --- core/string_name.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/string_name.h') diff --git a/core/string_name.h b/core/string_name.h index df6b458581..886ddd0ee7 100644 --- a/core/string_name.h +++ b/core/string_name.h @@ -35,6 +35,8 @@ #include "core/safe_refcount.h" #include "core/ustring.h" +class Main; + struct StaticCString { const char *ptr; static StaticCString create(const char *p_ptr); @@ -73,7 +75,7 @@ class StringName { void unref(); friend void register_core_types(); friend void unregister_core_types(); - + friend class Main; static Mutex mutex; static void setup(); static void cleanup(); -- cgit v1.2.3