| 21 | namespace { |
| 22 | |
| 23 | TEST(AllocatorTest, ReturnsValidMemory) { |
| 24 | Allocator allocator; |
| 25 | int *p; |
| 26 | allocator.Allocate(1, &p); |
| 27 | ASSERT_NE(p, nullptr); |
| 28 | |
| 29 | // If this is bogus memory, ASan will cause this test to fail. |
| 30 | *p = 42; |
| 31 | |
| 32 | allocator.FreeAll(); |
| 33 | } |
| 34 | |
| 35 | TEST(AllocatorTest, NoLeak) { |
| 36 | Allocator allocator; |
nothing calls this directly
no test coverage detected