Files
allocators/tests/libc_allocator.c
T

14 lines
452 B
C

#include "malunal/allocator.h"
#include "malunal/microtest.h"
MICROTEST(libc_allocator, can_acquire_and_dispose) {
malunal_mptr_t address = null;
allocator_mptr_t allocator = libc_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);
}