* eliminate C++ from tests

* midl files stay midl

* idl generated files should stay idl generate
This commit is contained in:
anporumb 2022-06-21 15:18:12 -07:00 коммит произвёл GitHub
Родитель 9fb051a8bd
Коммит e518fe7549
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
31 изменённых файлов: 4 добавлений и 167 удалений

2
deps/c-pal поставляемый

@ -1 +1 @@
Subproject commit f7032c4bd4e62b9daff1f48d9d8cd838b32f07f5
Subproject commit 6a5675adb376d1397e2f5f1ab59dd2661673cac3

2
deps/c-util поставляемый

@ -1 +1 @@
Subproject commit f05881ba7bc95677d34c7e6b79db8fc6e8ea183b
Subproject commit fb2392b3aa2acfa6feda3f11f6ed1b6bf60a84b4

2
deps/com-wrapper поставляемый

@ -1 +1 @@
Subproject commit 987a65df87ebe559ee8f19e689872b89b1f43e4e
Subproject commit 1723d1ff2129195f26c30a3e7989400ade7b41c9

2
deps/umock-c поставляемый

@ -1 +1 @@
Subproject commit df688af4edb185b8de28791dd9521531cebc5a2a
Subproject commit aaf66494363f8a3bc6443304fb69539c516f653b

Просмотреть файл

@ -1,15 +1,10 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#ifdef __cplusplus
#include <cstdlib>
#include <cstdint>
#else
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <wchar.h>
#endif
#define CINTERFACE

Просмотреть файл

@ -1,11 +1,7 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#ifdef __cplusplus
#include <cstdlib>
#else
#include <stdlib.h>
#endif
#include "macro_utils/macro_utils.h"

Просмотреть файл

@ -1,14 +1,9 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#ifdef __cplusplus
#include <cstdlib>
#include <cstdint>
#else
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#endif
#include "fabriccommon.h"

Просмотреть файл

@ -8,9 +8,6 @@
#include "windows.h"
#include "fabriccommon.h" // for IFabricAsyncOperationCallback
#ifdef __cplusplus
extern "C" {
#endif
typedef struct TEST_ASYNC_OPERATION_CONTEXT_TAG* TEST_ASYNC_OPERATION_CONTEXT_HANDLE;
@ -21,8 +18,5 @@ BOOLEAN test_async_operation_context_CompletedSynchronously(TEST_ASYNC_OPERATION
HRESULT test_async_operation_context_get_Callback(TEST_ASYNC_OPERATION_CONTEXT_HANDLE test_async_operation_context, IFabricAsyncOperationCallback** callback);
HRESULT test_async_operation_context_Cancel(TEST_ASYNC_OPERATION_CONTEXT_HANDLE test_async_operation_context);
#ifdef __cplusplus
}
#endif
#endif /* TEST_ASYNC_OPERATION_CONTEXT_H */

Просмотреть файл

@ -12,9 +12,6 @@
#include "windows.h"
#include "fabriccommon.h"
#ifdef __cplusplus
extern "C" {
#endif
#define TEST_ASYNC_OPERATION_CONTEXT_HANDLE_INTERFACES \
COM_WRAPPER_INTERFACE(IUnknown, \
@ -30,8 +27,5 @@ extern "C" {
DECLARE_COM_WRAPPER_OBJECT(TEST_ASYNC_OPERATION_CONTEXT_HANDLE, TEST_ASYNC_OPERATION_CONTEXT_HANDLE_INTERFACES);
#ifdef __cplusplus
}
#endif
#endif /* TEST_ASYNC_OPERATION_CONTEXT_COM_H */

Просмотреть файл

@ -7,9 +7,6 @@
#include "fabriccommon.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct TEST_FABRIC_ASYNC_OPERATION_TAG* TEST_FABRIC_ASYNC_OPERATION_HANDLE;
@ -24,8 +21,5 @@ HRESULT test_fabric_async_operation_EndTestOperationWithNoEndArgs(TEST_FABRIC_AS
HRESULT test_fabric_async_operation_BeginTestOperationWithNoArgs(TEST_FABRIC_ASYNC_OPERATION_HANDLE test_fabric_async_operation, IFabricAsyncOperationCallback* callback, IFabricAsyncOperationContext** context);
HRESULT test_fabric_async_operation_EndTestOperationWithNoArgs(TEST_FABRIC_ASYNC_OPERATION_HANDLE test_fabric_async_operation, IFabricAsyncOperationContext* context);
#ifdef __cplusplus
}
#endif
#endif /* TEST_FABRIC_ASYNC_OPERATION_H */

Просмотреть файл

@ -12,9 +12,6 @@
#include "com_wrapper/com_wrapper.h"
#include "test_fabric_async_operation.h"
#ifdef __cplusplus
extern "C" {
#endif
#define TEST_FABRIC_ASYNC_OPERATION_HANDLE_INTERFACES \
COM_WRAPPER_INTERFACE(IUnknown, \
@ -34,8 +31,5 @@ extern "C" {
DECLARE_COM_WRAPPER_OBJECT(TEST_FABRIC_ASYNC_OPERATION_HANDLE, TEST_FABRIC_ASYNC_OPERATION_HANDLE_INTERFACES);
#ifdef __cplusplus
}
#endif
#endif /* TEST_FABRIC_ASYNC_OPERATION_COM_H */

Просмотреть файл

@ -7,9 +7,6 @@
#include "sf_c_util/fabric_async_op_sync_wrapper.h"
#include "testasyncoperation.h"
#ifdef __cplusplus
extern "C" {
#endif
#define TEST_FABRIC_OPERATION_SIGNATURE \
BEGIN_ARGS(int, arg1), \
@ -17,8 +14,5 @@ extern "C" {
DECLARE_FABRIC_ASYNC_OPERATION_SYNC(ITestAsyncOperation, TestOperation, TEST_FABRIC_OPERATION_SIGNATURE)
#ifdef __cplusplus
}
#endif
#endif // TEST_FABRIC_ASYNC_OPERATION_CALL_H

Просмотреть файл

@ -7,9 +7,6 @@
#include "sf_c_util/fabric_async_op_sync_wrapper.h"
#include "testasyncoperation.h"
#ifdef __cplusplus
extern "C" {
#endif
#define TEST_FABRIC_OPERATION_WITH_NO_ARGS_SIGNATURE \
BEGIN_ARGS(), \
@ -17,8 +14,5 @@ extern "C" {
DECLARE_FABRIC_ASYNC_OPERATION_SYNC(ITestAsyncOperation, TestOperationWithNoArgs, TEST_FABRIC_OPERATION_WITH_NO_ARGS_SIGNATURE)
#ifdef __cplusplus
}
#endif
#endif // TEST_WRAPPER_NO_ARGS_H

Просмотреть файл

@ -7,9 +7,6 @@
#include "sf_c_util/fabric_async_op_sync_wrapper.h"
#include "testasyncoperation.h"
#ifdef __cplusplus
extern "C" {
#endif
#define TEST_FABRIC_OPERATION_WITH_NO_BEGIN_ARGS_SIGNATURE \
BEGIN_ARGS(), \
@ -17,8 +14,5 @@ extern "C" {
DECLARE_FABRIC_ASYNC_OPERATION_SYNC(ITestAsyncOperation, TestOperationWithNoBeginArgs, TEST_FABRIC_OPERATION_WITH_NO_BEGIN_ARGS_SIGNATURE);
#ifdef __cplusplus
}
#endif
#endif // TEST_WRAPPER_NO_BEGIN_ARGS_H

Просмотреть файл

@ -7,9 +7,6 @@
#include "sf_c_util/fabric_async_op_sync_wrapper.h"
#include "testasyncoperation.h"
#ifdef __cplusplus
extern "C" {
#endif
#define TEST_FABRIC_OPERATION_WITH_NO_END_ARGS_SIGNATURE \
BEGIN_ARGS(int, arg1), \
@ -17,8 +14,5 @@ extern "C" {
DECLARE_FABRIC_ASYNC_OPERATION_SYNC(ITestAsyncOperation, TestOperationWithNoEndArgs, TEST_FABRIC_OPERATION_WITH_NO_END_ARGS_SIGNATURE)
#ifdef __cplusplus
}
#endif
#endif // TEST_WRAPPER_NO_END_ARGS_H

Просмотреть файл

@ -1,13 +1,8 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#ifdef __cplusplus
#include <cstdlib>
#include <cstdint>
#else
#include <stdlib.h>
#include <stdint.h>
#endif
#include "fabriccommon.h"

Просмотреть файл

@ -8,9 +8,6 @@
#include "windows.h"
#include "fabriccommon.h" // for IFabricAsyncOperationCallback
#ifdef __cplusplus
extern "C" {
#endif
typedef struct TEST_ASYNC_OPERATION_CONTEXT_TAG* TEST_ASYNC_OPERATION_CONTEXT_HANDLE;
@ -21,8 +18,5 @@ BOOLEAN test_async_operation_context_CompletedSynchronously(TEST_ASYNC_OPERATION
HRESULT test_async_operation_context_get_Callback(TEST_ASYNC_OPERATION_CONTEXT_HANDLE test_async_operation_context, IFabricAsyncOperationCallback** callback);
HRESULT test_async_operation_context_Cancel(TEST_ASYNC_OPERATION_CONTEXT_HANDLE test_async_operation_context);
#ifdef __cplusplus
}
#endif
#endif /* TEST_ASYNC_OPERATION_CONTEXT_H */

Просмотреть файл

@ -12,9 +12,6 @@
#include "windows.h"
#include "fabriccommon.h"
#ifdef __cplusplus
extern "C" {
#endif
#define TEST_ASYNC_OPERATION_CONTEXT_HANDLE_INTERFACES \
COM_WRAPPER_INTERFACE(IUnknown, \
@ -30,8 +27,5 @@ extern "C" {
DECLARE_COM_WRAPPER_OBJECT(TEST_ASYNC_OPERATION_CONTEXT_HANDLE, TEST_ASYNC_OPERATION_CONTEXT_HANDLE_INTERFACES);
#ifdef __cplusplus
}
#endif
#endif /* TEST_ASYNC_OPERATION_CONTEXT_COM_H */

Просмотреть файл

@ -7,9 +7,6 @@
#include "fabriccommon.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct TEST_FABRIC_ASYNC_OPERATION_TAG* TEST_FABRIC_ASYNC_OPERATION_HANDLE;
@ -24,8 +21,5 @@ HRESULT test_fabric_async_operation_EndTestOperationWithNoEndArgs(TEST_FABRIC_AS
HRESULT test_fabric_async_operation_BeginTestOperationWithNoArgs(TEST_FABRIC_ASYNC_OPERATION_HANDLE test_fabric_async_operation, IFabricAsyncOperationCallback* callback, IFabricAsyncOperationContext** context);
HRESULT test_fabric_async_operation_EndTestOperationWithNoArgs(TEST_FABRIC_ASYNC_OPERATION_HANDLE test_fabric_async_operation, IFabricAsyncOperationContext* context);
#ifdef __cplusplus
}
#endif
#endif /* TEST_FABRIC_ASYNC_OPERATION_H */

Просмотреть файл

@ -12,9 +12,6 @@
#include "com_wrapper/com_wrapper.h"
#include "test_fabric_async_operation.h"
#ifdef __cplusplus
extern "C" {
#endif
#define TEST_FABRIC_ASYNC_OPERATION_HANDLE_INTERFACES \
COM_WRAPPER_INTERFACE(IUnknown, \
@ -34,8 +31,5 @@ extern "C" {
DECLARE_COM_WRAPPER_OBJECT(TEST_FABRIC_ASYNC_OPERATION_HANDLE, TEST_FABRIC_ASYNC_OPERATION_HANDLE_INTERFACES);
#ifdef __cplusplus
}
#endif
#endif /* TEST_FABRIC_ASYNC_OPERATION_COM_H */

Просмотреть файл

@ -7,9 +7,6 @@
#include "sf_c_util/fabric_async_op_wrapper.h"
#include "testasyncoperation.h"
#ifdef __cplusplus
extern "C" {
#endif
#define TEST_FABRIC_OPERATION_SIGNATURE \
BEGIN_ARGS(int, arg1), \
@ -17,8 +14,5 @@ extern "C" {
DECLARE_FABRIC_ASYNC_OPERATION(ITestAsyncOperation, TestOperation, TEST_FABRIC_OPERATION_SIGNATURE);
#ifdef __cplusplus
}
#endif
#endif // TEST_FABRIC_ASYNC_OPERATION_CALL_H

Просмотреть файл

@ -7,9 +7,6 @@
#include "sf_c_util/fabric_async_op_wrapper.h"
#include "testasyncoperation.h"
#ifdef __cplusplus
extern "C" {
#endif
#define TEST_FABRIC_OPERATION_WITH_NO_ARGS_SIGNATURE \
BEGIN_ARGS(), \
@ -17,8 +14,5 @@ extern "C" {
DECLARE_FABRIC_ASYNC_OPERATION(ITestAsyncOperation, TestOperationWithNoArgs, TEST_FABRIC_OPERATION_WITH_NO_ARGS_SIGNATURE)
#ifdef __cplusplus
}
#endif
#endif // TEST_WRAPPER_NO_ARGS_H

Просмотреть файл

@ -7,9 +7,6 @@
#include "sf_c_util/fabric_async_op_wrapper.h"
#include "testasyncoperation.h"
#ifdef __cplusplus
extern "C" {
#endif
#define TEST_FABRIC_OPERATION_WITH_NO_BEGIN_ARGS_SIGNATURE \
BEGIN_ARGS(), \
@ -17,8 +14,5 @@ extern "C" {
DECLARE_FABRIC_ASYNC_OPERATION(ITestAsyncOperation, TestOperationWithNoBeginArgs, TEST_FABRIC_OPERATION_WITH_NO_BEGIN_ARGS_SIGNATURE);
#ifdef __cplusplus
}
#endif
#endif // TEST_WRAPPER_NO_BEGIN_ARGS_H

Просмотреть файл

@ -7,9 +7,6 @@
#include "sf_c_util/fabric_async_op_wrapper.h"
#include "testasyncoperation.h"
#ifdef __cplusplus
extern "C" {
#endif
#define TEST_FABRIC_OPERATION_WITH_NO_END_ARGS_SIGNATURE \
BEGIN_ARGS(int, arg1), \
@ -17,8 +14,5 @@ extern "C" {
DECLARE_FABRIC_ASYNC_OPERATION(ITestAsyncOperation, TestOperationWithNoEndArgs, TEST_FABRIC_OPERATION_WITH_NO_END_ARGS_SIGNATURE)
#ifdef __cplusplus
}
#endif
#endif // TEST_WRAPPER_NO_END_ARGS_H

Просмотреть файл

@ -1,13 +1,8 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#ifdef __cplusplus
#include <cstdlib>
#include <cstdint>
#else
#include <stdlib.h>
#include <stdint.h>
#endif
#include "macro_utils/macro_utils.h"

Просмотреть файл

@ -7,9 +7,6 @@
#include "fabriccommon.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct TEST_CALLBACK_TAG* TEST_CALLBACK_HANDLE;
@ -17,8 +14,5 @@ TEST_CALLBACK_HANDLE test_callback_create(void);
void test_callback_destroy(TEST_CALLBACK_HANDLE test_callback);
void test_callback_Invoke(TEST_CALLBACK_HANDLE test_callback, IFabricAsyncOperationContext* context);
#ifdef __cplusplus
}
#endif
#endif /* TEST_CALLBACK_H */

Просмотреть файл

@ -12,9 +12,6 @@
#include "windows.h"
#include "fabriccommon.h"
#ifdef __cplusplus
extern "C" {
#endif
#define TEST_CALLBACK_HANDLE_INTERFACES \
COM_WRAPPER_INTERFACE(IUnknown, \
@ -27,8 +24,5 @@ extern "C" {
DECLARE_COM_WRAPPER_OBJECT(TEST_CALLBACK_HANDLE, TEST_CALLBACK_HANDLE_INTERFACES);
#ifdef __cplusplus
}
#endif
#endif /* TEST_CALLBACK_COM_H */

Просмотреть файл

@ -1,11 +1,7 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#ifdef __cplusplus
#include <cstdlib>
#else
#include <stdlib.h>
#endif
#include "macro_utils/macro_utils.h"

Просмотреть файл

@ -1,14 +1,9 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#ifdef __cplusplus
#include <cstdlib>
#include <cstdint>
#else
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#endif
#include "windows.h"

Просмотреть файл

@ -1,14 +1,9 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#ifdef __cplusplus
#include <cstdlib>
#include <cstdint>
#else
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#endif
#include "real_gballoc_ll.h"
static void* my_gballoc_malloc(size_t size)
@ -32,9 +27,6 @@ static void my_gballoc_free(void* ptr)
#include "windows.h"
#ifdef __cplusplus
extern "C" {
#endif
#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*/
@ -79,9 +71,6 @@ MOCKABLE_FUNCTION(, DWORD, mocked_GetModuleFileNameA,
#include "real_gballoc_hl.h"
#ifdef __cplusplus
}
#endif
#include "sf_c_util/hresult_to_string.h"

Просмотреть файл

@ -4,13 +4,8 @@
#ifndef REAL_HRESULT_TO_STRING_H
#define REAL_HRESULT_TO_STRING_H
#ifdef __cplusplus
#include <cstdint>
#include <cstddef>
#else
#include <stdint.h>
#include <stddef.h>
#endif
#include "macro_utils/macro_utils.h"
@ -26,9 +21,6 @@
#include "sf_c_util/hresult_to_string.h"
#ifdef __cplusplus
extern "C" {
#endif
char* real_hresult_to_string(malloc_t the_malloc, free_t the_free, HRESULT hr);
wchar_t* real_hresult_to_wstring(HRESULT hresult);
@ -36,8 +28,5 @@ extern "C" {
void* real_same_as_malloc(size_t size);
#ifdef __cplusplus
}
#endif
#endif //REAL_HRESULT_TO_STRING_H