14 lines
460 B
C
14 lines
460 B
C
#include "malunal/allocator.h"
|
|
#include "malunal/microtest.h"
|
|
|
|
MICROTEST(platform_allocator, can_acquire_and_dispose) {
|
|
malunal_mptr_t address = null;
|
|
allocator_mptr_t allocator = platform_allocator();
|
|
error_t result = allocator_acquire(allocator, 32, &address);
|
|
MICROTEST_EXPECT_NULL(result.domain);
|
|
MICROTEST_ASSERT_NOT_NULL(address);
|
|
|
|
result = allocator_dispose(allocator, address, 32);
|
|
MICROTEST_EXPECT_NULL(result.domain);
|
|
}
|