зеркало из https://github.com/Azure/c-pal.git
Anpo fix execution engine reals (#311)
* fix execution engine reals * added also tests for execution engine, becuse those were missing
This commit is contained in:
Родитель
47ee6cc488
Коммит
b2aebe0ac5
|
@ -25,7 +25,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
EXECUTION_ENGINE_HANDLE real_execution_engine_create(void* execution_engine_parameters);
|
||||
EXECUTION_ENGINE_HANDLE real_execution_engine_create(const EXECUTION_ENGINE_PARAMETERS* execution_engine_parameters);
|
||||
void real_execution_engine_dec_ref(EXECUTION_ENGINE_HANDLE execution_engine);
|
||||
void real_execution_engine_inc_ref(EXECUTION_ENGINE_HANDLE execution_engine);
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "c_pal/string_utils.h" // IWYU pragma: keep
|
||||
#include "c_pal/threadpool.h" // IWYU pragma: keep
|
||||
#include "c_pal/uuid.h" // IWYU pragma: keep
|
||||
#include "c_pal/execution_engine.h" // IWYU pragma: keep
|
||||
|
||||
#define REGISTER_GLOBAL_MOCK_HOOK(original, real) \
|
||||
(original == real) ? (void)0 : (void)1;
|
||||
|
@ -19,6 +20,7 @@
|
|||
#include "real_threadapi.h"
|
||||
#include "real_threadpool.h"
|
||||
#include "real_uuid.h"
|
||||
#include "real_execution_engine.h"
|
||||
|
||||
BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)
|
||||
|
||||
|
@ -36,6 +38,7 @@ TEST_FUNCTION(check_all_c_pal_reals)
|
|||
REGISTER_THREADAPI_GLOBAL_MOCK_HOOK();
|
||||
REGISTER_THREADPOOL_GLOBAL_MOCK_HOOK();
|
||||
REGISTER_UUID_GLOBAL_MOCK_HOOK();
|
||||
REGISTER_EXECUTION_ENGINE_GLOBAL_MOCK_HOOK();
|
||||
// assert
|
||||
// no explicit assert, if it builds it works
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include "real_gballoc_hl_renames.h"
|
||||
|
||||
#include "real_interlocked_renames.h"
|
||||
|
||||
#include "real_execution_engine_renames.h"
|
||||
|
||||
#include "real_execution_engine_win32_renames.h" /*note: for execution_engine_win32_get_threadpool*/
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
EXECUTION_ENGINE_HANDLE real_execution_engine_create(void* execution_engine_parameters);
|
||||
EXECUTION_ENGINE_HANDLE real_execution_engine_create(const EXECUTION_ENGINE_PARAMETERS* execution_engine_parameters);
|
||||
void real_execution_engine_dec_ref(EXECUTION_ENGINE_HANDLE execution_engine);
|
||||
void real_execution_engine_inc_ref(EXECUTION_ENGINE_HANDLE execution_engine);
|
||||
|
||||
|
|
|
@ -16,12 +16,13 @@
|
|||
#include "c_pal/sync.h"
|
||||
#include "c_pal/arithmetic.h"
|
||||
#include "c_pal/uuid.h"
|
||||
#include "c_pal/execution_engine.h"
|
||||
|
||||
#include "macro_utils/macro_utils.h"
|
||||
|
||||
#ifdef REGISTER_GLOBAL_MOCK_HOOK
|
||||
#undef REGISTER_GLOBAL_MOCK_HOOK
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define REGISTER_GLOBAL_MOCK_HOOK(original, real) \
|
||||
(original == real) ? (void)0 : (void)1;
|
||||
|
@ -39,6 +40,7 @@
|
|||
#include "real_sync.h"
|
||||
#include "real_arithmetic.h"
|
||||
#include "real_uuid.h"
|
||||
#include "real_execution_engine.h"
|
||||
|
||||
BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE)
|
||||
|
||||
|
@ -62,6 +64,7 @@ TEST_FUNCTION(check_all_c_pal_reals)
|
|||
REGISTER_SYNC_GLOBAL_MOCK_HOOK();
|
||||
REGISTER_ARITHMETIC_GLOBAL_MOCK_HOOK();
|
||||
REGISTER_UUID_GLOBAL_MOCK_HOOK();
|
||||
REGISTER_EXECUTION_ENGINE_GLOBAL_MOCK_HOOK();
|
||||
|
||||
// assert
|
||||
// no explicit assert, if it builds it works
|
||||
|
|
Загрузка…
Ссылка в новой задаче