summaryrefslogtreecommitdiffstats
path: root/tests/cpp-compiler/cpp-compile-shared-library.cpp
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-10-29 14:49:26 +0800
committerGitHub <noreply@github.com>2024-10-29 14:49:26 +0800
commitf65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 (patch)
treeea1d61342cd29368e19135000ec2948813096205 /tests/cpp-compiler/cpp-compile-shared-library.cpp
parenta729c15e9dce9f5116a38afc66329ab2ca4cea54 (diff)
format
* format * Minor test fixes * enable checking cpp format in ci
Diffstat (limited to 'tests/cpp-compiler/cpp-compile-shared-library.cpp')
-rw-r--r--tests/cpp-compiler/cpp-compile-shared-library.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/tests/cpp-compiler/cpp-compile-shared-library.cpp b/tests/cpp-compiler/cpp-compile-shared-library.cpp
index c802a57cd..a69e22899 100644
--- a/tests/cpp-compiler/cpp-compile-shared-library.cpp
+++ b/tests/cpp-compiler/cpp-compile-shared-library.cpp
@@ -1,21 +1,19 @@
-//TEST(smoke):CPP_COMPILER_SHARED_LIBRARY:
+// TEST(smoke):CPP_COMPILER_SHARED_LIBRARY:
-#include <stdlib.h>
+#include <iostream>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
-
-#include <iostream>
using namespace std;
-
+
#if defined(_MSC_VER)
-# define DLL_EXPORT __declspec(dllexport)
+#define DLL_EXPORT __declspec(dllexport)
#else
-# define DLL_EXPORT __attribute__((__visibility__("default")))
-#endif
-
+#define DLL_EXPORT __attribute__((__visibility__("default")))
+#endif
+
extern "C" DLL_EXPORT int test(int intValue, const char* textValue, char* outTextValue)
{
strcpy(outTextValue, textValue);
return intValue;
}
-