test/platform/pthread/thread/test_thread_mutex_create.cpp
TEST(basics)
{
    allocator* alloc = nullptr;
    thread_mutex* mut = nullptr;

    /* we should be able to create a malloc allocator. */
    TEST_ASSERT(STATUS_SUCCESS == malloc_allocator_create(&alloc));

    /* we should be able to create a thread mutex. */
    TEST_ASSERT(STATUS_SUCCESS == thread_mutex_create(&mut, alloc));

    /* we should be able to release a thread mutex. */
    TEST_ASSERT(
        STATUS_SUCCESS == resource_release(thread_mutex_resource_handle(mut)));

    /* clean up. */
    TEST_ASSERT(
        STATUS_SUCCESS == resource_release(allocator_resource_handle(alloc)));
}
/**
 * Verify that we can create a mutex.
 */
Verify that we can create a mutex.
Verify that we can create a mutex .
TEST(basics)
{
    allocator* alloc = nullptr;
    thread_mutex* mut = nullptr;
    TEST_ASSERT(STATUS_SUCCESS == malloc_allocator_create(&alloc));
    TEST_ASSERT(STATUS_SUCCESS == thread_mutex_create(&mut, alloc));
    TEST_ASSERT(
        STATUS_SUCCESS == resource_release(thread_mutex_resource_handle(mut)));
    TEST_ASSERT(
        STATUS_SUCCESS == resource_release(allocator_resource_handle(alloc)));
}
TEST ( basics ) { allocator * alloc = nullptr ; thread_mutex * mut = nullptr ; TEST_ASSERT ( STATUS_SUCCESS == malloc_allocator_create ( & alloc ) ) ; TEST_ASSERT ( STATUS_SUCCESS == thread_mutex_create ( & mut , alloc ) ) ; TEST_ASSERT ( STATUS_SUCCESS == resource_release ( thread_mutex_resource_handle ( mut ) ) ) ; TEST_ASSERT ( STATUS_SUCCESS == resource_release ( allocator_resource_handle ( alloc ) ) ) ; }
Verify that we can create a mutex.
Verify that we can create a mutex .
/* we should be able to create a malloc allocator. */ /* we should be able to create a thread mutex. */ /* we should be able to release a thread mutex. */ /* clean up. */