Replace CDS_ATOMIC with namespace atomics
[libcds.git] / tests / cppunit / test_beans.h
1 //$$CDS-header$$
2
3 // Forward declarations
4 namespace cds {
5     namespace intrusive {}
6     namespace opt {}
7 }
8
9 // Including this header is a bad thing for header testing. How to avoid it?..
10 #include <cds/cxx11_atomic.h>   // for cds::atomicity::empty_item_counter
11
12 namespace test_beans {
13     template <typename ItemCounter>
14     struct check_item_counter {
15         bool operator()( size_t nReal, size_t nExpected )
16         {
17             return nReal == nExpected;
18         }
19     };
20
21     template <>
22     struct check_item_counter<cds::atomicity::empty_item_counter>
23     {
24         bool operator()( size_t nReal, size_t /*nExpected*/ )
25         {
26             return nReal == 0;
27         }
28     };
29 } // namespace beans