| 80 | }; |
| 81 | |
| 82 | TEST(SimpleStringInternalCache, cacheHitWithOneEntry) |
| 83 | { |
| 84 | createCacheForSize(10, 1); |
| 85 | cache.setAllocator(allocator); |
| 86 | |
| 87 | char* mem = cache.alloc(10); |
| 88 | mem[0] = 'B'; |
| 89 | mem[3] = 'A'; |
| 90 | mem[9] = 'S'; |
| 91 | |
| 92 | cache.setAllocator(allocator->originalAllocator()); |
| 93 | |
| 94 | LONGS_EQUAL(0, accountant.totalAllocationsOfSize(10)); |
| 95 | CHECK(!cache.hasFreeBlocksOfSize(10)); |
| 96 | |
| 97 | cache.setAllocator(allocator); |
| 98 | } |
| 99 | |
| 100 | TEST(SimpleStringInternalCache, cacheHitWithTwoEntries) |
| 101 | { |
nothing calls this directly
no test coverage detected