Set up PackedData when setting up tests

Some tests need functions of ProjectSettings that rely on this being
available.
This commit is contained in:
George Marques 2021-04-07 14:23:18 -03:00
parent 5f77f38573
commit c165814d36
No known key found for this signature in database
GPG key ID: 046BD46A3201E43D

View file

@ -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);
}