test/allocator/test_malloc_allocator.cpp
TEST(create_release)
{
    allocator* alloc = nullptr;
    resource* alloc_resource = nullptr;

    /* we can successfully create a malloc allocator. */
    TEST_ASSERT(
        STATUS_SUCCESS == malloc_allocator_create(&alloc));

    /* the allocator pointer is valid. */
    TEST_ASSERT(
        nullptr != alloc);

    /* get the allocator resource handle. */
    alloc_resource = allocator_resource_handle(alloc);

    /* this resource handle is valid. */
    TEST_ASSERT(
        nullptr != alloc_resource);

    /* we can release this resource. */
    TEST_ASSERT(
        STATUS_SUCCESS == resource_release(alloc_resource));
}
/**
 * Verify that we can create and release a malloc allocator.
 */
Verify that we can create and release a malloc allocator.
Verify that we can create and release a malloc allocator .
TEST(create_release)
{
    allocator* alloc = nullptr;
    resource* alloc_resource = nullptr;
    TEST_ASSERT(
        STATUS_SUCCESS == malloc_allocator_create(&alloc));
    TEST_ASSERT(
        nullptr != alloc);
    alloc_resource = allocator_resource_handle(alloc);
    TEST_ASSERT(
        nullptr != alloc_resource);
    TEST_ASSERT(
        STATUS_SUCCESS == resource_release(alloc_resource));
}
TEST ( create_release ) { allocator * alloc = nullptr ; resource * alloc_resource = nullptr ; TEST_ASSERT ( STATUS_SUCCESS == malloc_allocator_create ( & alloc ) ) ; TEST_ASSERT ( nullptr != alloc ) ; alloc_resource = allocator_resource_handle ( alloc ) ; TEST_ASSERT ( nullptr != alloc_resource ) ; TEST_ASSERT ( STATUS_SUCCESS == resource_release ( alloc_resource ) ) ; }
Verify that we can create and release a malloc allocator.
Verify that we can create and release a malloc allocator .
/* we can successfully create a malloc allocator. */ /* the allocator pointer is valid. */ /* get the allocator resource handle. */ /* this resource handle is valid. */ /* we can release this resource. */