From f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Tue, 29 Oct 2024 14:49:26 +0800 Subject: format * format * Minor test fixes * enable checking cpp format in ci --- tests/cpp-compiler/c-compile-shared-library.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'tests/cpp-compiler/c-compile-shared-library.c') diff --git a/tests/cpp-compiler/c-compile-shared-library.c b/tests/cpp-compiler/c-compile-shared-library.c index 5ae61d65b..5af13b4c9 100644 --- a/tests/cpp-compiler/c-compile-shared-library.c +++ b/tests/cpp-compiler/c-compile-shared-library.c @@ -1,25 +1,24 @@ -//TEST(smoke,shared-library):CPP_COMPILER_SHARED_LIBRARY: +// TEST(smoke,shared-library):CPP_COMPILER_SHARED_LIBRARY: -#include #include -#include - +#include +#include + #if defined(_MSC_VER) -# define DLL_EXPORT __declspec(dllexport) -#else -//# define DLL_EXPORT -# define DLL_EXPORT __attribute__ ((dllexport)) __attribute__((__visibility__("default"))) -#endif +#define DLL_EXPORT __declspec(dllexport) +#else +// # define DLL_EXPORT +#define DLL_EXPORT __attribute__((dllexport)) __attribute__((__visibility__("default"))) +#endif -#ifdef __cplusplus +#ifdef __cplusplus #define EXTERN_C extern "C" #else -#define EXTERN_C -#endif - +#define EXTERN_C +#endif + EXTERN_C DLL_EXPORT int test(int intValue, const char* textValue, char* outTextValue) { strcpy(outTextValue, textValue); return intValue; } - -- cgit v1.2.3