diff options
author | killzebug <killzebug@protonmail.com> | 2024-04-22 20:11:39 +0300 |
---|---|---|
committer | killzebug <killzebug@protonmail.com> | 2024-04-22 23:50:20 +0300 |
commit | 53a95d6a00a89cd56414553f2e18aa41ac060198 (patch) | |
tree | 24a1847d1ac6a35e6947b7b52dee0346d319d8ab /tests | |
parent | 7529c0bec597d70bc61975a82063bb5112ac8879 (diff) | |
download | redot-engine-53a95d6a00a89cd56414553f2e18aa41ac060198.tar.gz |
Suppressed expected errors for uncached resources.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/core/io/test_resource.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/core/io/test_resource.h b/tests/core/io/test_resource.h index 9ddb51220b..a83e7f88ba 100644 --- a/tests/core/io/test_resource.h +++ b/tests/core/io/test_resource.h @@ -38,6 +38,8 @@ #include "thirdparty/doctest/doctest.h" +#include "tests/test_macros.h" + namespace TestResource { TEST_CASE("[Resource] Duplication") { @@ -124,9 +126,12 @@ TEST_CASE("[Resource] Breaking circular references on save") { const String save_path_binary = OS::get_singleton()->get_cache_path().path_join("resource.res"); const String save_path_text = OS::get_singleton()->get_cache_path().path_join("resource.tres"); ResourceSaver::save(resource_a, save_path_binary); + // Suppress expected errors caused by the resources above being uncached. + ERR_PRINT_OFF; ResourceSaver::save(resource_a, save_path_text); const Ref<Resource> &loaded_resource_a_binary = ResourceLoader::load(save_path_binary); + ERR_PRINT_ON; CHECK_MESSAGE( loaded_resource_a_binary->get_name() == "A", "The loaded resource name should be equal to the expected value."); |