issue#11: tests/cppunit: changed .h file guard prefix to CDS_CPPUNIT_xxx
[libcds.git] / tests / cppunit / test_beans.h
1 //$$CDS-header$$
2
3 #ifndef CDS_CPPUNIT_TEST_BEANS_H
4 #define CDS_CPPUNIT_TEST_BEANS_H
5
6
7 // Forward declarations
8 namespace cds {
9     namespace intrusive {}
10     namespace opt {}
11 }
12
13 // Including this header is a bad thing for header testing. How to avoid it?..
14 #include <cds/algo/atomic.h>   // for cds::atomicity::empty_item_counter
15
16 namespace test_beans {
17     template <typename ItemCounter>
18     struct check_item_counter {
19         bool operator()( size_t nReal, size_t nExpected )
20         {
21             return nReal == nExpected;
22         }
23     };
24
25     template <>
26     struct check_item_counter<cds::atomicity::empty_item_counter>
27     {
28         bool operator()( size_t nReal, size_t /*nExpected*/ )
29         {
30             return nReal == 0;
31         }
32     };
33 } // namespace beans
34
35 #endif // #ifndef CDS_CPPUNIT_TEST_BEANS_H