| 87 | } // anonymous namespace |
| 88 | |
| 89 | TEST_P(BasicCorrectness, Alloc) { |
| 90 | cg::StaticMemAlloc* allocator = this->m_allocator.get(); |
| 91 | allocator->add(0, 1, 1, makeuk(0)); |
| 92 | allocator->add(0, 1, 1, makeuk(1)); |
| 93 | allocator->add(1, 2, 2, makeuk(2)); |
| 94 | allocator->solve(); |
| 95 | ASSERT_EQ( |
| 96 | std::max(align(2 + padding()), 2 * align(1 + padding())), |
| 97 | allocator->tot_alloc()); |
| 98 | ASSERT_EQ( |
| 99 | std::max(align(2 + padding()), 2 * align(1 + padding())), |
| 100 | allocator->tot_alloc_lower_bound()); |
| 101 | } |
| 102 | |
| 103 | TEST_P(BasicCorrectness, Overwrite) { |
| 104 | cg::StaticMemAlloc* allocator = this->m_allocator.get(); |
nothing calls this directly
no test coverage detected