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