GCC Code Coverage Report
Directory: . Exec Total Coverage
File: test/unit/test_node.h Lines: 10 10 100.0 %
Date: 2021-09-16 Branches: 6 12 50.0 %

Line Exec Source
1
/******************************************************************************
2
 * Top contributors (to current version):
3
 *   Aina Niemetz, Andrew Reynolds
4
 *
5
 * This file is part of the cvc5 project.
6
 *
7
 * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
8
 * in the top-level source directory and their institutional affiliations.
9
 * All rights reserved.  See the file COPYING in the top-level source
10
 * directory for licensing information.
11
 * ****************************************************************************
12
 *
13
 * Common header for Node unit tests.
14
 */
15
16
#ifndef CVC5__TEST__UNIT__TEST_NODE_H
17
#define CVC5__TEST__UNIT__TEST_NODE_H
18
19
#include "expr/node_manager.h"
20
#include "expr/skolem_manager.h"
21
#include "smt/smt_engine.h"
22
#include "smt/smt_engine_scope.h"
23
#include "test.h"
24
25
namespace cvc5 {
26
namespace test {
27
28
440
class TestNode : public TestInternal
29
{
30
 protected:
31
220
  void SetUp() override
32
  {
33
220
    d_nodeManager.reset(new NodeManager());
34
220
    d_skolemManager = d_nodeManager->getSkolemManager();
35
220
    d_scope.reset(new NodeManagerScope(d_nodeManager.get()));
36
220
    d_boolTypeNode.reset(new TypeNode(d_nodeManager->booleanType()));
37
220
    d_bvTypeNode.reset(new TypeNode(d_nodeManager->mkBitVectorType(2)));
38
220
    d_intTypeNode.reset(new TypeNode(d_nodeManager->integerType()));
39
220
    d_realTypeNode.reset(new TypeNode(d_nodeManager->realType()));
40
220
  }
41
42
  std::unique_ptr<NodeManagerScope> d_scope;
43
  std::unique_ptr<NodeManager> d_nodeManager;
44
  SkolemManager* d_skolemManager;
45
  std::unique_ptr<TypeNode> d_boolTypeNode;
46
  std::unique_ptr<TypeNode> d_bvTypeNode;
47
  std::unique_ptr<TypeNode> d_intTypeNode;
48
  std::unique_ptr<TypeNode> d_realTypeNode;
49
};
50
51
}  // namespace test
52
}  // namespace cvc5
53
#endif