summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2021-04-07 14:23:18 -0300
committerGeorge Marques <george@gmarqu.es>2021-04-08 09:35:06 -0300
commitc165814d36e14b74b1cfff8442c81ada17d8bef9 (patch)
treefadae4c29de9aa419dd6107ac9a9008cff386c2c
parent5f77f38573a8127e50946169e01b5ee09cfc1c96 (diff)
Set up PackedData when setting up tests
Some tests need functions of ProjectSettings that rely on this being available.
-rw-r--r--main/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/main.cpp b/main/main.cpp
index aa925c508c..5ad5a01aa6 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -390,6 +390,8 @@ Error Main::test_setup() {
register_core_types();
register_core_driver_types();
+ packed_data = memnew(PackedData);
+
globals = memnew(ProjectSettings);
GLOBAL_DEF("debug/settings/crash_handler/message",
@@ -459,6 +461,9 @@ void Main::test_cleanup() {
if (globals) {
memdelete(globals);
}
+ if (packed_data) {
+ memdelete(packed_data);
+ }
if (engine) {
memdelete(engine);
}