1 | // |
2 | // TuplesTest.h |
3 | // |
4 | // Definition of the TuplesTest class. |
5 | // |
6 | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. |
7 | // and Contributors. |
8 | // |
9 | // SPDX-License-Identifier: BSL-1.0 |
10 | // |
11 | |
12 | |
13 | #ifndef TuplesTest_INCLUDED |
14 | #define TuplesTest_INCLUDED |
15 | |
16 | |
17 | #include "Poco/Foundation.h" |
18 | #include "Poco/CppUnit/TestCase.h" |
19 | |
20 | |
21 | class TuplesTest: public CppUnit::TestCase |
22 | { |
23 | public: |
24 | TuplesTest(const std::string& name); |
25 | ~TuplesTest(); |
26 | |
27 | void testTuple1(); |
28 | void testTuple2(); |
29 | void testTuple3(); |
30 | void testTuple4(); |
31 | void testTuple5(); |
32 | void testTuple6(); |
33 | void testTuple7(); |
34 | void testTuple8(); |
35 | void testTuple9(); |
36 | void testTuple10(); |
37 | void testTuple11(); |
38 | void testTuple12(); |
39 | void testTuple13(); |
40 | void testTuple14(); |
41 | void testTuple15(); |
42 | void testTuple16(); |
43 | void testTuple17(); |
44 | void testTuple18(); |
45 | void testTuple19(); |
46 | void testTuple20(); |
47 | void testTuple21(); |
48 | void testTuple22(); |
49 | void testTuple23(); |
50 | void testTuple24(); |
51 | void testTuple25(); |
52 | void testTuple26(); |
53 | void testTuple27(); |
54 | void testTuple28(); |
55 | void testTuple29(); |
56 | void testTuple30(); |
57 | void testTuple31(); |
58 | void testTuple32(); |
59 | void testTuple33(); |
60 | void testTuple34(); |
61 | void testTuple35(); |
62 | void testTuple36(); |
63 | void testTuple37(); |
64 | void testTuple38(); |
65 | void testTuple39(); |
66 | void testTuple40(); |
67 | void testTupleOrder(); |
68 | void testTupleNullable(); |
69 | void testMemOverhead(); |
70 | void setUp(); |
71 | void tearDown(); |
72 | |
73 | static CppUnit::Test* suite(); |
74 | |
75 | private: |
76 | |
77 | template <class T> |
78 | void testTupleStrictWeak(const T& t1, const T& t2, const T& t3) |
79 | { |
80 | assertTrue (t1 < t2 && !(t2 < t1)); // antisymmetric |
81 | assertTrue (t1 < t2 && t2 < t3 && t1 < t3); // transitive |
82 | assertTrue (!(t1 < t1)); // irreflexive |
83 | } |
84 | }; |
85 | |
86 | |
87 | #endif // TuplesTest_INCLUDED |
88 | |