Browse Source

Fix errors when testing `Resource`

Replaces `get_meta` with `has_meta` for cases where the meta is expected
to be empty.
A Thousand Ships 1 year ago
parent
commit
7726ed6740
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tests/core/io/test_resource.h

+ 2 - 2
tests/core/io/test_resource.h

@@ -139,7 +139,7 @@ TEST_CASE("[Resource] Breaking circular references on save") {
 			loaded_resource_c_binary->get_name() == "C",
 			loaded_resource_c_binary->get_name() == "C",
 			"The loaded child resource name should be equal to the expected value.");
 			"The loaded child resource name should be equal to the expected value.");
 	CHECK_MESSAGE(
 	CHECK_MESSAGE(
-			!loaded_resource_c_binary->get_meta("next"),
+			!loaded_resource_c_binary->has_meta("next"),
 			"The loaded child resource circular reference should be NULL.");
 			"The loaded child resource circular reference should be NULL.");
 
 
 	const Ref<Resource> &loaded_resource_a_text = ResourceLoader::load(save_path_text);
 	const Ref<Resource> &loaded_resource_a_text = ResourceLoader::load(save_path_text);
@@ -155,7 +155,7 @@ TEST_CASE("[Resource] Breaking circular references on save") {
 			loaded_resource_c_text->get_name() == "C",
 			loaded_resource_c_text->get_name() == "C",
 			"The loaded child resource name should be equal to the expected value.");
 			"The loaded child resource name should be equal to the expected value.");
 	CHECK_MESSAGE(
 	CHECK_MESSAGE(
-			!loaded_resource_c_text->get_meta("next"),
+			!loaded_resource_c_text->has_meta("next"),
 			"The loaded child resource circular reference should be NULL.");
 			"The loaded child resource circular reference should be NULL.");
 
 
 	// Break circular reference to avoid memory leak
 	// Break circular reference to avoid memory leak