From 9a58e63237298be0c81fe88096f65d935be97e82 Mon Sep 17 00:00:00 2001 From: Aina Niemetz Date: Thu, 25 Feb 2021 11:44:48 -0800 Subject: [PATCH] google test: Merge Node(Manager) fixtures. (#5998) --- test/unit/expr/node_algorithm_black.cpp | 2 +- test/unit/expr/node_black.cpp | 4 ++-- test/unit/expr/node_builder_black.cpp | 2 +- test/unit/expr/node_manager_black.cpp | 2 +- test/unit/expr/node_manager_white.cpp | 2 +- test/unit/expr/node_self_iterator_black.cpp | 2 +- test/unit/expr/node_traversal_black.cpp | 4 ++-- test/unit/expr/node_white.cpp | 2 +- test/unit/expr/type_node_white.cpp | 4 ++-- test/unit/test_node.h | 14 +------------- 10 files changed, 13 insertions(+), 25 deletions(-) diff --git a/test/unit/expr/node_algorithm_black.cpp b/test/unit/expr/node_algorithm_black.cpp index 95018d9f1..66bad7ee8 100644 --- a/test/unit/expr/node_algorithm_black.cpp +++ b/test/unit/expr/node_algorithm_black.cpp @@ -32,7 +32,7 @@ using namespace kind; namespace test { -class TestNodeBlackNodeAlgorithm : public TestNodeBlack +class TestNodeBlackNodeAlgorithm : public TestNode { }; diff --git a/test/unit/expr/node_black.cpp b/test/unit/expr/node_black.cpp index 33576b2cc..ddbdcde6b 100644 --- a/test/unit/expr/node_black.cpp +++ b/test/unit/expr/node_black.cpp @@ -52,12 +52,12 @@ std::vector makeNSkolemNodes(NodeManager* nodeManager, } } // namespace -class TestNodeBlackNode : public TestNodeBlack +class TestNodeBlackNode : public TestNode { protected: void SetUp() override { - TestNodeBlack::SetUp(); + TestNode::SetUp(); // setup an SMT engine so that options are in scope Options opts; char* argv[2]; diff --git a/test/unit/expr/node_builder_black.cpp b/test/unit/expr/node_builder_black.cpp index 20f907e18..b5e028d41 100644 --- a/test/unit/expr/node_builder_black.cpp +++ b/test/unit/expr/node_builder_black.cpp @@ -36,7 +36,7 @@ using namespace kind; namespace test { -class TestNodeBlackNodeBuilder : public TestNodeBlack +class TestNodeBlackNodeBuilder : public TestNode { protected: template diff --git a/test/unit/expr/node_manager_black.cpp b/test/unit/expr/node_manager_black.cpp index 09463a28e..4b72f0418 100644 --- a/test/unit/expr/node_manager_black.cpp +++ b/test/unit/expr/node_manager_black.cpp @@ -32,7 +32,7 @@ using namespace expr; namespace test { -class TestNodeBlackNodeManager : public TestNodeBlack +class TestNodeBlackNodeManager : public TestNode { }; diff --git a/test/unit/expr/node_manager_white.cpp b/test/unit/expr/node_manager_white.cpp index e7c9cf69d..d491d19ab 100644 --- a/test/unit/expr/node_manager_white.cpp +++ b/test/unit/expr/node_manager_white.cpp @@ -27,7 +27,7 @@ using namespace CVC4::expr; namespace test { -class TestNodeWhiteNodeManager : public TestNodeWhite +class TestNodeWhiteNodeManager : public TestNode { }; diff --git a/test/unit/expr/node_self_iterator_black.cpp b/test/unit/expr/node_self_iterator_black.cpp index 20d04b52b..a937cb312 100644 --- a/test/unit/expr/node_self_iterator_black.cpp +++ b/test/unit/expr/node_self_iterator_black.cpp @@ -26,7 +26,7 @@ using namespace expr; namespace test { -class TestNodeBlackNodeSelfIterator : public TestNodeBlack +class TestNodeBlackNodeSelfIterator : public TestNode { }; diff --git a/test/unit/expr/node_traversal_black.cpp b/test/unit/expr/node_traversal_black.cpp index d2921a929..5e6fc4ce0 100644 --- a/test/unit/expr/node_traversal_black.cpp +++ b/test/unit/expr/node_traversal_black.cpp @@ -33,11 +33,11 @@ using namespace kind; namespace test { -class TestNodeBlackNodeTraversalPostorder : public TestNodeBlack +class TestNodeBlackNodeTraversalPostorder : public TestNode { }; -class TestNodeBlackNodeTraversalPreorder : public TestNodeBlack +class TestNodeBlackNodeTraversalPreorder : public TestNode { }; diff --git a/test/unit/expr/node_white.cpp b/test/unit/expr/node_white.cpp index 2581cb546..8259d6cc9 100644 --- a/test/unit/expr/node_white.cpp +++ b/test/unit/expr/node_white.cpp @@ -26,7 +26,7 @@ using namespace expr; namespace test { -class TestNodeWhiteNode : public TestNodeWhite +class TestNodeWhiteNode : public TestNode { }; diff --git a/test/unit/expr/type_node_white.cpp b/test/unit/expr/type_node_white.cpp index 085b57642..e7a5fcc61 100644 --- a/test/unit/expr/type_node_white.cpp +++ b/test/unit/expr/type_node_white.cpp @@ -32,12 +32,12 @@ using namespace context; namespace test { -class TestNodeWhiteTypeNode : public TestNodeWhite +class TestNodeWhiteTypeNode : public TestNode { protected: void SetUp() override { - TestNodeWhite::SetUp(); + TestNode::SetUp(); d_smt.reset(new SmtEngine(d_nodeManager.get())); } std::unique_ptr d_smt; diff --git a/test/unit/test_node.h b/test/unit/test_node.h index 81d3e250a..485b29cf6 100644 --- a/test/unit/test_node.h +++ b/test/unit/test_node.h @@ -23,7 +23,7 @@ namespace CVC4 { namespace test { -class TestNodeBlack : public TestInternal +class TestNode : public TestInternal { protected: void SetUp() override @@ -44,18 +44,6 @@ class TestNodeBlack : public TestInternal std::unique_ptr d_realTypeNode; }; -class TestNodeWhite : public TestInternal -{ - protected: - void SetUp() override - { - d_nodeManager.reset(new NodeManager(nullptr)); - d_scope.reset(new NodeManagerScope(d_nodeManager.get())); - } - - std::unique_ptr d_scope; - std::unique_ptr d_nodeManager; -}; } // namespace test } // namespace CVC4 #endif -- 2.30.2