diff options
author | Arne Juul <arnej@verizonmedia.com> | 2020-11-05 12:11:41 +0000 |
---|---|---|
committer | Arne Juul <arnej@verizonmedia.com> | 2020-11-05 12:11:41 +0000 |
commit | a782057e6ef5105313dc2ffdee3ff00d0f670cf5 (patch) | |
tree | 5c20f4140c2abbf630353d44b4199ec67c01fc99 /eval | |
parent | 8092b21022943489786fe27c02d4a79942382ee7 (diff) |
rename method counting typed nodes
Diffstat (limited to 'eval')
-rw-r--r-- | eval/src/tests/eval/tensor_lambda/tensor_lambda_test.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/eval/src/tests/eval/tensor_lambda/tensor_lambda_test.cpp b/eval/src/tests/eval/tensor_lambda/tensor_lambda_test.cpp index 06749c33843..a2150c3d1bb 100644 --- a/eval/src/tests/eval/tensor_lambda/tensor_lambda_test.cpp +++ b/eval/src/tests/eval/tensor_lambda/tensor_lambda_test.cpp @@ -215,7 +215,7 @@ TEST("require that type resolving also include nodes in the inner tensor lambda EXPECT_EQUAL(types.get_type(*symbol).to_spec(), "double"); } -size_t num_exported(const NodeTypes &types) { +size_t count_nodes(const NodeTypes &types) { size_t cnt = 0; types.each([&](const auto &, const auto &){++cnt;}); return cnt; @@ -227,7 +227,7 @@ TEST("require that type exporting also include nodes in the inner tensor lambda const auto &root = fun->root(); NodeTypes copy = types.export_types(root); EXPECT_TRUE(copy.errors().empty()); - EXPECT_EQUAL(num_exported(types), num_exported(copy)); + EXPECT_EQUAL(count_nodes(types), count_nodes(copy)); auto lambda = nodes::as<nodes::TensorLambda>(root); ASSERT_TRUE(lambda != nullptr); @@ -239,7 +239,7 @@ TEST("require that type exporting also include nodes in the inner tensor lambda NodeTypes inner = outer.export_types(inner_lambda->lambda().root()); EXPECT_TRUE(inner.errors().empty()); // [x, y, (x+y), a, (x+y)+a] are the 5 nodes: - EXPECT_EQUAL(num_exported(inner), 5u); + EXPECT_EQUAL(count_nodes(inner), 5u); } TEST_MAIN() { TEST_RUN_ALL(); } |