mirror of
https://github.com/thunderbrewhq/common.git
synced 2025-12-12 11:12:29 +00:00
17 lines
477 B
C++
17 lines
477 B
C++
#include "common/ObjectAlloc.hpp"
|
|
#include "test/Test.hpp"
|
|
|
|
TEST_CASE("ObjectAllocAddHeap", "[objectalloc]") {
|
|
SECTION("creates a new heap and returns a heap id") {
|
|
struct Foo {
|
|
uint32_t field1;
|
|
uint32_t field2;
|
|
};
|
|
|
|
auto heapId1 = ObjectAllocAddHeap(sizeof(Foo), 1024, "Foo", true);
|
|
auto heapId2 = ObjectAllocAddHeap(sizeof(Foo), 1024, "Foo", true);
|
|
|
|
CHECK(heapId1 == 0);
|
|
CHECK(heapId2 == 1);
|
|
}
|
|
}
|