Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion samples/async_op_samples_int/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ set(${theseTestsName}_h_files
ml_async_op_module_with_retries.h
)

build_test_artifacts(${theseTestsName} "samples" ADDITIONAL_LIBS c_util)
build_test_artifacts(${theseTestsName} "samples" ADDITIONAL_LIBS c_pal c_util)
7 changes: 4 additions & 3 deletions samples/async_op_samples_int/async_op_samples_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "c_pal/sync.h"
#include "c_pal/thandle.h"
#include "c_pal/threadapi.h"
#include "c_pal/timed_test_suite.h"

#include "c_util/async_op.h"

Expand Down Expand Up @@ -366,12 +367,12 @@ static void test_ASYNC_OP_MODULE_CALLBACK(void* context, COMMON_ASYNC_OP_MODULE_

BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)

TEST_SUITE_INITIALIZE(TestClassInit)
TIMED_TEST_SUITE_INITIALIZE(TestClassInit, TIMED_TEST_DEFAULT_TIMEOUT_MS)
{
ASSERT_ARE_EQUAL(int, 0, gballoc_hl_init(NULL, NULL));
}

TEST_SUITE_CLEANUP(TestClassCleanup)
TIMED_TEST_SUITE_CLEANUP(TestClassCleanup)
{
gballoc_hl_deinit();
}
Expand Down Expand Up @@ -1444,4 +1445,4 @@ TEST_FUNCTION(all_modules_can_be_canceled_successfully_with_real_cancel_after_ma
}
}

END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)
END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)
2 changes: 1 addition & 1 deletion tests/async_op_int/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ set(${theseTestsName}_c_files
set(${theseTestsName}_h_files
)

build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_util)
build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_util)
7 changes: 4 additions & 3 deletions tests/async_op_int/async_op_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "c_pal/gballoc_hl_redirect.h"

#include "c_pal/thandle.h"
#include "c_pal/timed_test_suite.h"

#include "c_util/async_op.h"

Expand Down Expand Up @@ -84,12 +85,12 @@ static ASYNC_OP_DISPOSE disposes[] =

BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)

TEST_SUITE_INITIALIZE(setsBufferTempSize)
TIMED_TEST_SUITE_INITIALIZE(setsBufferTempSize, TIMED_TEST_DEFAULT_TIMEOUT_MS)
{
ASSERT_ARE_EQUAL(int, 0, gballoc_hl_init(NULL, NULL));
}

TEST_SUITE_CLEANUP(TestClassCleanup)
TIMED_TEST_SUITE_CLEANUP(TestClassCleanup)
{
gballoc_hl_deinit();
}
Expand Down Expand Up @@ -144,4 +145,4 @@ TEST_FUNCTION(async_op_from_context_with_alignment_1)
}
}

END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)
END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)
4 changes: 2 additions & 2 deletions tests/async_op_ut/async_op_ut.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code)

BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)

TEST_SUITE_INITIALIZE(setsBufferTempSize)
TIMED_TEST_SUITE_INITIALIZE(setsBufferTempSize, TIMED_TEST_DEFAULT_TIMEOUT_MS)
{
ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL));

Expand All @@ -33,7 +33,7 @@ TEST_SUITE_INITIALIZE(setsBufferTempSize)
REGISTER_GLOBAL_MOCK_FAIL_RETURN(realloc, NULL);
}

TEST_SUITE_CLEANUP(TestClassCleanup)
TIMED_TEST_SUITE_CLEANUP(TestClassCleanup)
{
umock_c_deinit();

Expand Down
4 changes: 3 additions & 1 deletion tests/async_op_ut/async_op_ut_pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include "testrunnerswitcher.h"
#include "umock_c/umock_c.h"

#include "c_pal/timed_test_suite.h"

#include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS

#include "c_pal/gballoc_hl.h"
Expand All @@ -26,4 +28,4 @@

#include "c_util/async_op.h"

#endif // ASYNC_OP_UT_PCH_H
#endif // ASYNC_OP_UT_PCH_H
4 changes: 2 additions & 2 deletions tests/async_retry_wrapper_ut/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Copyright (c) Microsoft. All rights reserved.
#Copyright (c) Microsoft. All rights reserved.

set(theseTestsName async_retry_wrapper_ut)

Expand All @@ -25,6 +25,6 @@ set(${theseTestsName}_h_files
include_directories(../../inc)

build_test_artifacts(${theseTestsName} "tests/c_util"
ADDITIONAL_LIBS c_util c_pal_reals
ADDITIONAL_LIBS c_pal c_util c_pal_reals
ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_retry_wrapper_ut_pch.h"
)
4 changes: 2 additions & 2 deletions tests/async_retry_wrapper_ut/async_retry_wrapper_ut.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code)

BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)

TEST_SUITE_INITIALIZE(suite_init)
TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS)
{
ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL));

Expand Down Expand Up @@ -258,7 +258,7 @@ TEST_SUITE_INITIALIZE(suite_init)
REGISTER_TYPE(TEST_ASYNC_API_SYNC_MULTIPLE_RESULT, TEST_ASYNC_API_SYNC_MULTIPLE_RESULT);
}

TEST_SUITE_CLEANUP(suite_cleanup)
TIMED_TEST_SUITE_CLEANUP(suite_cleanup)
{
THANDLE_ASSIGN(REAL_THREADPOOL)(&g.test_threadpool, NULL);
umock_c_deinit();
Expand Down
4 changes: 3 additions & 1 deletion tests/async_retry_wrapper_ut/async_retry_wrapper_ut_pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

#include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to interlocked.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/

#include "c_pal/timed_test_suite.h"

#include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS
#define GBALLOC_HL_REDIRECT_H
#undef GBALLOC_HL_REDIRECT_H
Expand Down Expand Up @@ -46,4 +48,4 @@

#include "c_util/async_retry_wrapper.h"

#endif // ASYNC_RETRY_WRAPPER_UT_PCH_H
#endif // ASYNC_RETRY_WRAPPER_UT_PCH_H
4 changes: 2 additions & 2 deletions tests/async_type_helper_copy_value_handler_ut/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Copyright (c) Microsoft. All rights reserved.
#Copyright (c) Microsoft. All rights reserved.

set(theseTestsName async_type_helper_copy_value_handler_ut)

Expand All @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files
)

build_test_artifacts(${theseTestsName} "tests/c_util"
ADDITIONAL_LIBS c_util c_pal_reals
ADDITIONAL_LIBS c_pal c_util c_pal_reals
ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_type_helper_copy_value_handler_ut_pch.h"
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All rights reserved.
// Copyright (c) Microsoft. All rights reserved.



Expand Down Expand Up @@ -27,7 +27,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code)

BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)

TEST_SUITE_INITIALIZE(suite_init)
TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS)
{
ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL));

Expand All @@ -38,7 +38,7 @@ TEST_SUITE_INITIALIZE(suite_init)

}

TEST_SUITE_CLEANUP(suite_cleanup)
TIMED_TEST_SUITE_CLEANUP(suite_cleanup)
{
umock_c_deinit();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to this interlocked.h, temporary solution*/

#include "c_pal/timed_test_suite.h"

#include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS
#include "c_pal/gballoc_hl.h"
#include "c_pal/gballoc_hl_redirect.h"
Expand All @@ -28,4 +30,4 @@

#include "c_util/async_type_helper_copy_value_handler.h"

#endif // ASYNC_TYPE_HELPER_COPY_VALUE_HANDLER_UT_PCH_H
#endif // ASYNC_TYPE_HELPER_COPY_VALUE_HANDLER_UT_PCH_H
4 changes: 2 additions & 2 deletions tests/async_type_helper_ref_counted_handler_ut/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Copyright (c) Microsoft. All rights reserved.
#Copyright (c) Microsoft. All rights reserved.

set(theseTestsName async_type_helper_ref_counted_handler_ut)

Expand All @@ -16,6 +16,6 @@ set(${theseTestsName}_h_files
)

build_test_artifacts(${theseTestsName} "tests/c_util"
ADDITIONAL_LIBS c_util c_pal_reals
ADDITIONAL_LIBS c_pal c_util c_pal_reals
ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_type_helper_ref_counted_handler_ut_pch.h"
)
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code)

BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)

TEST_SUITE_INITIALIZE(suite_init)
TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS)
{
ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL));

Expand All @@ -38,7 +38,7 @@ TEST_SUITE_INITIALIZE(suite_init)
REGISTER_UMOCK_ALIAS_TYPE(TEST_REFCOUNTED_HANDLE, void*);
}

TEST_SUITE_CLEANUP(suite_cleanup)
TIMED_TEST_SUITE_CLEANUP(suite_cleanup)
{
umock_c_deinit();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to this interlocked.h, temporary solution*/

#include "c_pal/timed_test_suite.h"

#include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS
#include "c_pal/gballoc_hl.h"
#include "c_pal/gballoc_hl_redirect.h"
Expand All @@ -29,4 +31,4 @@

#include "c_util/async_type_helper_ref_counted_handler.h"

#endif // ASYNC_TYPE_HELPER_REF_COUNTED_HANDLER_UT_PCH_H
#endif // ASYNC_TYPE_HELPER_REF_COUNTED_HANDLER_UT_PCH_H
4 changes: 2 additions & 2 deletions tests/async_type_helper_thandle_handler_ut/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Copyright (c) Microsoft. All rights reserved.
#Copyright (c) Microsoft. All rights reserved.

set(theseTestsName async_type_helper_thandle_handler_ut)

Expand All @@ -16,6 +16,6 @@ set(${theseTestsName}_h_files
)

build_test_artifacts(${theseTestsName} "tests/c_util"
ADDITIONAL_LIBS c_util c_pal_reals
ADDITIONAL_LIBS c_pal c_util c_pal_reals
ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_type_helper_thandle_handler_ut_pch.h"
)
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code)

BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)

TEST_SUITE_INITIALIZE(suite_init)
TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS)
{
ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL));

Expand All @@ -43,7 +43,7 @@ TEST_SUITE_INITIALIZE(suite_init)
REGISTER_UMOCK_ALIAS_TYPE(THANDLE(TEST_THANDLE), void*);
}

TEST_SUITE_CLEANUP(suite_cleanup)
TIMED_TEST_SUITE_CLEANUP(suite_cleanup)
{
umock_c_deinit();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to this interlocked.h, temporary solution*/

#include "c_pal/timed_test_suite.h"

#include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS
#include "c_pal/gballoc_hl.h"
#include "c_pal/gballoc_hl_redirect.h"
Expand All @@ -32,4 +34,4 @@

// This is a hack. If test_thandle would be simply at global scope they'd be const and noone could write to them in the test functions

#endif // ASYNC_TYPE_HELPER_THANDLE_HANDLER_UT_PCH_H
#endif // ASYNC_TYPE_HELPER_THANDLE_HANDLER_UT_PCH_H
4 changes: 2 additions & 2 deletions tests/async_type_helper_ut/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Copyright (c) Microsoft. All rights reserved.
#Copyright (c) Microsoft. All rights reserved.

set(theseTestsName async_type_helper_ut)

Expand All @@ -15,6 +15,6 @@ set(${theseTestsName}_h_files
)

build_test_artifacts(${theseTestsName} "tests/c_util"
ADDITIONAL_LIBS c_util c_pal_reals c_util_reals
ADDITIONAL_LIBS c_pal c_util c_pal_reals c_util_reals
ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_type_helper_ut_pch.h"
)
6 changes: 3 additions & 3 deletions tests/async_type_helper_ut/async_type_helper_ut.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All rights reserved.
// Copyright (c) Microsoft. All rights reserved.

#include "async_type_helper_ut_pch.h"

Expand All @@ -18,7 +18,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code)

BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)

TEST_SUITE_INITIALIZE(suite_init)
TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS)
{
ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL));

Expand All @@ -44,7 +44,7 @@ TEST_SUITE_INITIALIZE(suite_init)
REGISTER_UMOCK_ALIAS_TYPE(constbuffer_array_ptr, CONSTBUFFER_ARRAY_HANDLE*);
}

TEST_SUITE_CLEANUP(suite_cleanup)
TIMED_TEST_SUITE_CLEANUP(suite_cleanup)
{
umock_c_deinit();

Expand Down
4 changes: 3 additions & 1 deletion tests/async_type_helper_ut/async_type_helper_ut_pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

#include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to interlocked.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/

#include "c_pal/timed_test_suite.h"

#include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS
#include "c_pal/gballoc_hl.h"
#include "c_pal/gballoc_hl_redirect.h"
Expand All @@ -34,4 +36,4 @@

#define TEST_PAYLOAD_SIZE 128

#endif // ASYNC_TYPE_HELPER_UT_PCH_H
#endif // ASYNC_TYPE_HELPER_UT_PCH_H
4 changes: 2 additions & 2 deletions tests/azure_base64_ut/azure_base64_ut.c
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code)

BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)

TEST_SUITE_INITIALIZE(TestSuiteInitialize)
TIMED_TEST_SUITE_INITIALIZE(TestSuiteInitialize, TIMED_TEST_DEFAULT_TIMEOUT_MS)
{
ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL));

Expand All @@ -1453,7 +1453,7 @@ TEST_SUITE_INITIALIZE(TestSuiteInitialize)
REGISTER_GBALLOC_HL_GLOBAL_MOCK_HOOK();
}

TEST_SUITE_CLEANUP(TestClassCleanup)
TIMED_TEST_SUITE_CLEANUP(TestClassCleanup)
{
umock_c_deinit();

Expand Down
4 changes: 3 additions & 1 deletion tests/azure_base64_ut/azure_base64_ut_pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#include "umock_c/umock_c.h"
#include "umock_c/umock_c_negative_tests.h"

#include "c_pal/timed_test_suite.h"

#include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS
#include "c_pal/gballoc_hl.h"
#include "c_pal/gballoc_hl_redirect.h"
Expand All @@ -27,4 +29,4 @@

#include "c_util/azure_base64.h"

#endif // AZURE_BASE64_UT_PCH_H
#endif // AZURE_BASE64_UT_PCH_H
Loading
Loading