Add tests for Heap allocator
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, macos-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled

Add Heap::getMaxSize()
Add Heap::getUsed()
Add minSize argument to Heap::init()
This commit is contained in:
2026-09-15 22:48:03 -07:00
parent 76062cdf03
commit 033bf5d6ef
6 changed files with 49 additions and 4 deletions

View File

@@ -6,6 +6,14 @@
namespace mimir_tests {
TEST(Arena, InitialState)
{
mimir::init();
mimir::Arena arena;
EXPECT_TRUE(arena.init());
EXPECT_EQ(arena.getUsed(), 0);
}
TEST(Arena, OutOfMemory)
{
mimir::init();