GCC Code Coverage Report
Directory: . Exec Total Coverage
File: test/unit/node/kind_map_black.cpp Lines: 10 10 100.0 %
Date: 2021-03-23 Branches: 23 78 29.5 %

Line Exec Source
1
/*********************                                                        */
2
/*! \file kind_map_black.cpp
3
 ** \verbatim
4
 ** Top contributors (to current version):
5
 **   Aina Niemetz, Gereon Kremer
6
 ** This file is part of the CVC4 project.
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.\endverbatim
11
 **
12
 ** \brief Black box testing of CVC4::KindMap
13
 **
14
 ** Black box testing of CVC4::KindMap.
15
 **/
16
17
#include <iostream>
18
#include <sstream>
19
#include <string>
20
21
#include "expr/kind_map.h"
22
#include "test.h"
23
24
namespace CVC4 {
25
26
using namespace kind;
27
28
namespace test {
29
30
4
class TestNodeBlackKindMap : public TestInternal
31
{
32
};
33
34
10
TEST_F(TestNodeBlackKindMap, simple)
35
{
36
2
  KindMap map;
37
2
  ASSERT_FALSE(map.test(AND));
38
2
  map.set(AND);
39
2
  ASSERT_TRUE(map.test(AND));
40
2
  map.reset(AND);
41
2
  ASSERT_FALSE(map.test(AND));
42
#ifdef CVC4_ASSERTIONS
43
4
  ASSERT_THROW(map.set(LAST_KIND), AssertArgumentException);
44
#endif
45
}
46
47
}  // namespace test
48
6
}  // namespace CVC4