50 for (uint i=0; i<siz; ++i)
51 checksum_ += (crap_[i] =
rani(128));
56 for (uint i=0; i<siz; ++i)
57 checksum_ -= crap_[i];
80 CHECK (0 == checksum_);
87 CHECK (
sizeof(DummyObj<1>) !=
sizeof(DummyObj<22>));
90 PD1 pD11 = allocator.create<DummyObj<1> >();
91 PD1 pD12 = allocator.create<DummyObj<1> >();
92 PD22 pD21 = allocator.create<DummyObj<22>>();
93 PD22 pD22 = allocator.create<DummyObj<22>>();
98 CHECK (1 == pD11.use_count());
99 CHECK (1 == pD12.use_count());
100 CHECK (1 == pD21.use_count());
101 CHECK (1 == pD22.use_count());
102 CHECK (!isSameObject (*pD11, *pD12));
103 CHECK (!isSameObject (*pD11, *pD21));
104 CHECK (!isSameObject (*pD11, *pD22));
105 CHECK (!isSameObject (*pD12, *pD21));
106 CHECK (!isSameObject (*pD12, *pD22));
107 CHECK (!isSameObject (*pD21, *pD22));
111 CHECK (2 == pD21.use_count());
112 CHECK (2 == pD2x.use_count());
113 CHECK (isSameObject (*pD21, *pD2x));
115 CHECK (2 == allocator.numSlots<DummyObj<1> >());
116 CHECK (2 == allocator.numSlots<DummyObj<22>>());
118 CHECK (0 == allocator.numSlots<
long>());
121 CHECK (0 == allocator.numSlots<DummyObj<1> >());
122 CHECK (0 == allocator.numSlots<DummyObj<22>>());
123 CHECK (0 == checksum_);
Abstract foundation for building custom allocation managers.
int rani(uint bound=_iBOUND())
Implementation namespace for support and library code.
Yet-another ctor/dtor-tracking test dummy object....
Simplistic test class runner.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
Foundation for a custom allocation manager, tracking the created objects by smart-ptrs.
bool isSameObject(A const &a, B const &b)
compare plain object identity, based directly on the referee's memory identities. ...