tests/test_mempool.c

changeset 785
bb18daa62d5f
parent 781
a786b0a89b37
equal deleted inserted replaced
784:ba5faf85dec6 785:bb18daa62d5f
95 int *rdata = data; 95 int *rdata = data;
96 unsigned n = 1; 96 unsigned n = 1;
97 while (rdata == data) { 97 while (rdata == data) {
98 n <<= 1; 98 n <<= 1;
99 // eventually the memory should be moved elsewhere 99 // eventually the memory should be moved elsewhere
100 CX_TEST_ASSERTM(n < 65536, "Reallocation attempt failed - test not executable."); 100 CX_TEST_ASSERTM(n < 65536, "Reallocation attempt failed - test not executable");
101 rdata = cxRealloc(pool->allocator, data, n * sizeof(intptr_t)); 101 rdata = cxRealloc(pool->allocator, data, n * sizeof(intptr_t));
102 } 102 }
103 103
104 CX_TEST_ASSERT(*rdata == 13); 104 CX_TEST_ASSERT(*rdata == 13);
105 // test if destructor is still intact 105 // test if destructor is still intact

mercurial