// test at different sizes. this triggers grow() behavior differently.
// grow() was completely broken in revision 256
- void testCDList_BE10() { listTest(10); }
- void testCDList_BE15() { listTest(15); }
- void testCDList_BE20() { listTest(20); }
- void testCDList_BE35() { listTest(35); }
- void testCDList_BE50() { listTest(50); }
- void testCDList_BE99() { listTest(99); }
+ void testCDList10() { listTest(10); }
+ void testCDList15() { listTest(15); }
+ void testCDList20() { listTest(20); }
+ void testCDList35() { listTest(35); }
+ void testCDList50() { listTest(50); }
+ void testCDList99() { listTest(99); }
void listTest(int N) {
listTest(N, true);
}
void listTest(int N, bool callDestructor) {
- CDList_BE<int> list(d_context, callDestructor);
+ CDList<int> list(d_context, callDestructor);
TS_ASSERT(list.empty());
for(int i = 0; i < N; ++i) {
TS_ASSERT(!list.empty());
TS_ASSERT_EQUALS(list.back(), i);
int i2 = 0;
- for(CDList_BE<int>::const_iterator j = list.begin();
+ for(CDList<int>::const_iterator j = list.begin();
j != list.end();
++j) {
TS_ASSERT_EQUALS(*j, i2++);
bool shouldAlsoRemainFalse = false;
bool aThirdFalse = false;
- CDList_BE<DtorSensitiveObject> listT(d_context, true);
- CDList_BE<DtorSensitiveObject> listF(d_context, false);
+ CDList<DtorSensitiveObject> listT(d_context, true);
+ CDList<DtorSensitiveObject> listF(d_context, false);
DtorSensitiveObject shouldRemainFalseDSO(shouldRemainFalse);
DtorSensitiveObject shouldFlipToTrueDSO(shouldFlipToTrue);
}
void testEmptyIterator() {
- CDList_BE<int>* list = new(true) CDList_BE<int>(d_context);
+ CDList<int>* list = new(true) CDList<int>(d_context);
TS_ASSERT_EQUALS(list->begin(), list->end());
list->deleteSelf();
}
#else /* __APPLE__ */
- CDList_BE<unsigned> list(d_context);
+ CDList<unsigned> list(d_context);
WithLimitedMemory wlm(1);
TS_ASSERT_THROWS({
//Debug.on("gc");
//Debug.on("context");
- CDHashMap<int, CDList_BE<myint>*, int_hasher> map(d_context);
+ CDHashMap<int, CDList<myint>*, int_hasher> map(d_context);
- CDList_BE<myint> *list1, *list2, *list3, *list4;
+ CDList<myint> *list1, *list2, *list3, *list4;
TS_ASSERT(map.find(1) == map.end());
TS_ASSERT(map.find(2) == map.end());
int* x = (int*) d_context->getCMM()->newData(sizeof(int));
- list1 = new(d_context->getCMM()) CDList_BE<myint>(true, d_context);
- list2 = new(d_context->getCMM()) CDList_BE<myint>(true, d_context);
- list3 = new(d_context->getCMM()) CDList_BE<myint>(true, d_context);
- list4 = new(d_context->getCMM()) CDList_BE<myint>(true, d_context);
+ list1 = new(d_context->getCMM()) CDList<myint>(true, d_context);
+ list2 = new(d_context->getCMM()) CDList<myint>(true, d_context);
+ list3 = new(d_context->getCMM()) CDList<myint>(true, d_context);
+ list4 = new(d_context->getCMM()) CDList<myint>(true, d_context);
list1->push_back(1);
list2->push_back(2);