From ae0eadb9d2c52e86800a6031280e65894b988d44 Mon Sep 17 00:00:00 2001 From: nikitalita <69168929+nikitalita@users.noreply.github.com> Date: Sun, 29 Dec 2024 01:21:34 -0800 Subject: [PATCH] fix tests --- tests/test_engine_asserts.h | 2 ++ tests/test_gdre_project_loading.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/tests/test_engine_asserts.h b/tests/test_engine_asserts.h index 313cc845..c0a902fd 100644 --- a/tests/test_engine_asserts.h +++ b/tests/test_engine_asserts.h @@ -38,6 +38,7 @@ TEST_CASE("[GDSDecomp][ResourceLoaderText] ResourceLoaderText::FORMAT_VERSION ha } TEST_CASE("[GDSDecomp][ResourceFormatLoaderCompatBinary] ResourceFormatLoaderCompatBinary can load a resource") { + CHECK(gdre::ensure_dir(get_tmp_path()) == OK); ResourceFormatSaverBinaryInstance saver; Ref resource; resource.instantiate(); @@ -61,6 +62,7 @@ TEST_CASE("[GDSDecomp][ResourceFormatLoaderCompatBinary] ResourceFormatLoaderCom } TEST_CASE("[GDSDecomp][ResourceFormatLoaderCompatText] ResourceFormatLoaderCompatBinary can load a resource") { + CHECK(gdre::ensure_dir(get_tmp_path()) == OK); ResourceFormatSaverTextInstance saver; Ref resource; resource.instantiate(); diff --git a/tests/test_gdre_project_loading.h b/tests/test_gdre_project_loading.h index 10065ebd..26e10e67 100644 --- a/tests/test_gdre_project_loading.h +++ b/tests/test_gdre_project_loading.h @@ -33,6 +33,7 @@ inline Error create_test_pck(const String &pck_path, const HashMapstore_string(content), ERR_FILE_CANT_WRITE); @@ -71,6 +72,7 @@ TEST_CASE("[GDSDecomp] GDRESettings works") { TEST_CASE("[GDSDecomp][ProjectConfigLoader] loading example from current engine") { CHECK(ProjectSettings::get_singleton()); + CHECK(gdre::ensure_dir(get_tmp_path()) == OK); auto text_project_path = get_tmp_path().path_join("project.godot"); ProjectSettings::get_singleton()->save_custom(text_project_path); auto binary_project_path = get_tmp_path().path_join("project.binary"); @@ -107,6 +109,7 @@ TEST_CASE("[GDSDecomp][ProjectConfigLoader] loading example from current engine" } TEST_CASE("[GDSDecomp] GDRESettings project loading") { + CHECK(gdre::ensure_dir(get_tmp_path()) == OK); auto tmp_pck_path = get_tmp_path().path_join("test.pck"); auto tmp_project_path = get_tmp_path().path_join("project.binary"); CHECK(ProjectSettings::get_singleton());