Lines Matching refs:aPool
39 vector_pool<int> aPool; in testPoolBasics() local
41 std::ptrdiff_t nIdx1 = aPool.alloc(); in testPoolBasics()
42 std::ptrdiff_t nIdx2 = aPool.alloc(); in testPoolBasics()
43 std::ptrdiff_t nIdx3 = aPool.alloc(); in testPoolBasics()
48 aPool.free(nIdx2); in testPoolBasics()
49 aPool.free(nIdx3); in testPoolBasics()
51 nIdx2 = aPool.alloc(); in testPoolBasics()
52 nIdx3 = aPool.alloc(); in testPoolBasics()
60 vector_pool<int> aPool; in testPoolValueSemantics() local
62 std::ptrdiff_t nIdx1 = aPool.store(0); in testPoolValueSemantics()
63 CPPUNIT_ASSERT_MESSAGE("allocator value semantics 1", aPool.get(nIdx1) == 0 ); in testPoolValueSemantics()
65 std::ptrdiff_t nIdx2 = aPool.store(1); in testPoolValueSemantics()
66 CPPUNIT_ASSERT_MESSAGE("allocator value semantics 2", aPool.get(nIdx2) == 1 ); in testPoolValueSemantics()
68 std::ptrdiff_t nIdx3 = aPool.store(2); in testPoolValueSemantics()
69 CPPUNIT_ASSERT_MESSAGE("allocator value semantics 3", aPool.get(nIdx3) == 2 ); in testPoolValueSemantics()
71 aPool.free(nIdx2); in testPoolValueSemantics()
72 aPool.free(nIdx3); in testPoolValueSemantics()
74 nIdx2 = aPool.store(1); in testPoolValueSemantics()
75 … CPPUNIT_ASSERT_MESSAGE("allocator value semantics 2 after fragmentation", aPool.get(nIdx2) == 1 ); in testPoolValueSemantics()
77 nIdx3 = aPool.store(2); in testPoolValueSemantics()
78 … CPPUNIT_ASSERT_MESSAGE("allocator value semantics 3 after fragmentation", aPool.get(nIdx3) == 2 ); in testPoolValueSemantics()