diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/core/io/test_resource.h | 6 | ||||
| -rw-r--r-- | tests/core/math/test_astar.h | 14 | ||||
| -rw-r--r-- | tests/core/object/test_object.h | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/tests/core/io/test_resource.h b/tests/core/io/test_resource.h index b3983bb06d..84d651b63f 100644 --- a/tests/core/io/test_resource.h +++ b/tests/core/io/test_resource.h @@ -69,7 +69,7 @@ TEST_CASE("[Resource] Duplication") { TEST_CASE("[Resource] Saving and loading") { Ref<Resource> resource = memnew(Resource); resource->set_name("Hello world"); - resource->set_meta(" ExampleMetadata ", Vector2i(40, 80)); + resource->set_meta("ExampleMetadata", Vector2i(40, 80)); resource->set_meta("string", "The\nstring\nwith\nunnecessary\nline\n\t\\\nbreaks"); Ref<Resource> child_resource = memnew(Resource); child_resource->set_name("I'm a child resource"); @@ -84,7 +84,7 @@ TEST_CASE("[Resource] Saving and loading") { loaded_resource_binary->get_name() == "Hello world", "The loaded resource name should be equal to the expected value."); CHECK_MESSAGE( - loaded_resource_binary->get_meta(" ExampleMetadata ") == Vector2i(40, 80), + loaded_resource_binary->get_meta("ExampleMetadata") == Vector2i(40, 80), "The loaded resource metadata should be equal to the expected value."); CHECK_MESSAGE( loaded_resource_binary->get_meta("string") == "The\nstring\nwith\nunnecessary\nline\n\t\\\nbreaks", @@ -99,7 +99,7 @@ TEST_CASE("[Resource] Saving and loading") { loaded_resource_text->get_name() == "Hello world", "The loaded resource name should be equal to the expected value."); CHECK_MESSAGE( - loaded_resource_text->get_meta(" ExampleMetadata ") == Vector2i(40, 80), + loaded_resource_text->get_meta("ExampleMetadata") == Vector2i(40, 80), "The loaded resource metadata should be equal to the expected value."); CHECK_MESSAGE( loaded_resource_text->get_meta("string") == "The\nstring\nwith\nunnecessary\nline\n\t\\\nbreaks", diff --git a/tests/core/math/test_astar.h b/tests/core/math/test_astar.h index 859172dca3..1306d3c20e 100644 --- a/tests/core/math/test_astar.h +++ b/tests/core/math/test_astar.h @@ -37,7 +37,7 @@ namespace TestAStar { -class ABCX : public AStar { +class ABCX : public AStar3D { public: enum { A, @@ -66,7 +66,7 @@ public: } }; -TEST_CASE("[AStar] ABC path") { +TEST_CASE("[AStar3D] ABC path") { ABCX abcx; Vector<int> path = abcx.get_id_path(ABCX::A, ABCX::C); REQUIRE(path.size() == 3); @@ -75,7 +75,7 @@ TEST_CASE("[AStar] ABC path") { CHECK(path[2] == ABCX::C); } -TEST_CASE("[AStar] ABCX path") { +TEST_CASE("[AStar3D] ABCX path") { ABCX abcx; Vector<int> path = abcx.get_id_path(ABCX::X, ABCX::C); REQUIRE(path.size() == 4); @@ -85,8 +85,8 @@ TEST_CASE("[AStar] ABCX path") { CHECK(path[3] == ABCX::C); } -TEST_CASE("[AStar] Add/Remove") { - AStar a; +TEST_CASE("[AStar3D] Add/Remove") { + AStar3D a; // Manual tests. a.add_point(1, Vector3(0, 0, 0)); @@ -213,13 +213,13 @@ TEST_CASE("[AStar] Add/Remove") { // It's been great work, cheers. \(^ ^)/ } -TEST_CASE("[Stress][AStar] Find paths") { +TEST_CASE("[Stress][AStar3D] Find paths") { // Random stress tests with Floyd-Warshall. const int N = 30; Math::seed(0); for (int test = 0; test < 1000; test++) { - AStar a; + AStar3D a; Vector3 p[N]; bool adj[N][N] = { { false } }; diff --git a/tests/core/object/test_object.h b/tests/core/object/test_object.h index e44b93bb66..5b9d9cab53 100644 --- a/tests/core/object/test_object.h +++ b/tests/core/object/test_object.h @@ -133,7 +133,7 @@ TEST_CASE("[Object] Core getters") { } TEST_CASE("[Object] Metadata") { - const String meta_path = "hello/world complex métadata\n\n\t\tpath"; + const String meta_path = "complex_metadata_path"; Object object; object.set_meta(meta_path, Color(0, 1, 0)); |