From 618f6b613e6e0b68d67db4b5c4fa08fd1c3f60b7 Mon Sep 17 00:00:00 2001 From: Martin Felis Date: Sat, 19 Feb 2022 12:18:54 +0100 Subject: [PATCH] Minor test cleanup. --- src/AnimGraphResource.h | 1 - tests/AnimGraphResourceTests.cc | 13 ++++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/AnimGraphResource.h b/src/AnimGraphResource.h index 7af8f63..5cc5e0e 100644 --- a/src/AnimGraphResource.h +++ b/src/AnimGraphResource.h @@ -154,7 +154,6 @@ struct NodeSocketAccessorBase { const std::vector& sockets, const std::string& name) const { for (size_t i = 0, n = sockets.size(); i < n; i++) { - std::cout << i << ", " << sockets[i].m_name << std::endl; if (sockets[i].m_name == name) { return i; } diff --git a/tests/AnimGraphResourceTests.cc b/tests/AnimGraphResourceTests.cc index 30db462..73a50bb 100644 --- a/tests/AnimGraphResourceTests.cc +++ b/tests/AnimGraphResourceTests.cc @@ -66,12 +66,6 @@ TEST_CASE("BasicGraph", "[AnimGraphResource]") { AnimGraph graph = AnimGraph::createFromResource(graph_resource); - for (size_t i = 0; i < graph.m_nodes.size(); i++) { - const AnimNode* node = graph.m_nodes[i]; - std::cout << node->m_name << " [" << node->m_node_type_name << "]" - << std::endl; - } - REQUIRE(graph.m_nodes.size() == 5); REQUIRE(graph.m_nodes[0]->m_node_type_name == "BlendTree"); REQUIRE(graph.m_nodes[1]->m_node_type_name == "BlendTree"); @@ -411,6 +405,9 @@ TEST_CASE("GraphInputOutputConnectivity", "[AnimGraphResource]") { AnimSamplerNode* sampler_node = dynamic_cast( anim_graph.m_nodes[sampler_node_index]); + // + // check connectivity + // AnimData* graph_input0 = (AnimData*)anim_graph.GetInput("GraphAnimInput0"); REQUIRE(graph_input0 == &blend2_node->m_input0); @@ -439,7 +436,9 @@ TEST_CASE("GraphInputOutputConnectivity", "[AnimGraphResource]") { anim_graph.m_nodes[blend2_node_index] == anim_graph.getAnimNodeForInput(0, "GraphAnimOutput")); - // Check ordering + // + // check ordering + // REQUIRE (anim_graph.getAnimNodeOrderIndex(blend2_node) < anim_graph.getAnimNodeOrderIndex(sampler_node)); REQUIRE (anim_graph.getAnimNodeOrderIndex(blend2_node) < anim_graph.getAnimNodeOrderIndex(speed_scale_node)); REQUIRE (anim_graph.getAnimNodeOrderIndex(speed_scale_node) < anim_graph.getAnimNodeOrderIndex(sampler_node));