diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-02-06 21:51:36 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-02-07 11:50:40 +0100 |
commit | f3726ee99488695c4aae22fffd3649499b285faf (patch) | |
tree | 72c94797816a2f3da5ad4cb59a177ec74674a357 /main/tests | |
parent | b7297fb39ca7a55390f9390666bd29803adc827f (diff) |
Use modules_enabled.gen.h to improve inter dependency checks
- Fix build with gdscript module disabled. Fixes #31011.
- Remove unused `gdscript` compile option.
- Fix build with regex module disabled.
- Fix ImageLoaderSVG to forward declare thirdparty structs.
Diffstat (limited to 'main/tests')
-rw-r--r-- | main/tests/test_gdscript.cpp | 5 | ||||
-rw-r--r-- | main/tests/test_string.cpp | 14 |
2 files changed, 12 insertions, 7 deletions
diff --git a/main/tests/test_gdscript.cpp b/main/tests/test_gdscript.cpp index a6ef0e9cf4..a2891de8ff 100644 --- a/main/tests/test_gdscript.cpp +++ b/main/tests/test_gdscript.cpp @@ -34,7 +34,8 @@ #include "core/os/main_loop.h" #include "core/os/os.h" -#ifdef GDSCRIPT_ENABLED +#include "modules/modules_enabled.gen.h" +#ifdef MODULE_GDSCRIPT_ENABLED #include "modules/gdscript/gdscript.h" #include "modules/gdscript/gdscript_compiler.h" @@ -1091,7 +1092,7 @@ MainLoop *test(TestType p_type) { namespace TestGDScript { MainLoop *test(TestType p_type) { - + ERR_PRINT("The GDScript module is disabled, therefore GDScript tests cannot be used."); return NULL; } } // namespace TestGDScript diff --git a/main/tests/test_string.cpp b/main/tests/test_string.cpp index 9e8c8706ff..eef3d9b84c 100644 --- a/main/tests/test_string.cpp +++ b/main/tests/test_string.cpp @@ -28,15 +28,19 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "core/ustring.h" -#include <wchar.h> -//#include "core/math/math_funcs.h" +#include "test_string.h" + #include "core/io/ip_address.h" #include "core/os/os.h" +#include "core/ustring.h" + +#include "modules/modules_enabled.gen.h" +#ifdef MODULE_REGEX_ENABLED #include "modules/regex/regex.h" -#include <stdio.h> +#endif -#include "test_string.h" +#include <stdio.h> +#include <wchar.h> namespace TestString { |