From 341140b929ddb01cb5499979f18185d369c0be57 Mon Sep 17 00:00:00 2001 From: triton Date: Thu, 17 Apr 2014 17:03:52 +0100 Subject: [PATCH] Factor DLL API macros into its own shared header for tests. --- tests/Basic/Basic.h | 8 +------- tests/CLITemp/CLITemp.h | 6 +----- tests/CSharpTemp/CSharpTemp.h | 6 +----- tests/STL/STL.h | 7 +------ tests/Tests.h | 9 +++++++++ tests/UTF16/UTF16.h | 6 +----- tests/VTables/VTables.h | 6 +----- 7 files changed, 15 insertions(+), 33 deletions(-) create mode 100644 tests/Tests.h diff --git a/tests/Basic/Basic.h b/tests/Basic/Basic.h index d99af035..ba8a3854 100644 --- a/tests/Basic/Basic.h +++ b/tests/Basic/Basic.h @@ -1,10 +1,4 @@ -#if defined(_MSC_VER) -#define DLL_API __declspec(dllexport) -#else -#define DLL_API -#endif - -#define CS_OUT +#include "../Tests.h" class DLL_API Foo { diff --git a/tests/CLITemp/CLITemp.h b/tests/CLITemp/CLITemp.h index c507dbf5..15431f98 100644 --- a/tests/CLITemp/CLITemp.h +++ b/tests/CLITemp/CLITemp.h @@ -1,8 +1,4 @@ -#if defined(_MSC_VER) -#define DLL_API __declspec(dllexport) -#else -#define DLL_API -#endif +#include "../Tests.h" // Tests for C++ types struct DLL_API Types diff --git a/tests/CSharpTemp/CSharpTemp.h b/tests/CSharpTemp/CSharpTemp.h index 1f967826..f7365de4 100644 --- a/tests/CSharpTemp/CSharpTemp.h +++ b/tests/CSharpTemp/CSharpTemp.h @@ -1,8 +1,4 @@ -#if defined(_MSC_VER) -#define DLL_API __declspec(dllexport) -#else -#define DLL_API -#endif +#include "../Tests.h" class DLL_API Foo { diff --git a/tests/STL/STL.h b/tests/STL/STL.h index c0b7a337..b67e5b2e 100644 --- a/tests/STL/STL.h +++ b/tests/STL/STL.h @@ -1,9 +1,4 @@ -#if defined(_MSC_VER) -#define DLL_API __declspec(dllexport) -#else -#define DLL_API -#endif - +#include "../Tests.h" #include struct DLL_API TestVectors diff --git a/tests/Tests.h b/tests/Tests.h new file mode 100644 index 00000000..eec3d665 --- /dev/null +++ b/tests/Tests.h @@ -0,0 +1,9 @@ +#pragma once + +#if defined(_MSC_VER) +#define DLL_API __declspec(dllexport) +#else +#define DLL_API +#endif + +#define CS_OUT \ No newline at end of file diff --git a/tests/UTF16/UTF16.h b/tests/UTF16/UTF16.h index 6893aabc..799a38c9 100644 --- a/tests/UTF16/UTF16.h +++ b/tests/UTF16/UTF16.h @@ -1,8 +1,4 @@ -#if defined(_MSC_VER) -#define DLL_API __declspec(dllexport) -#else -#define DLL_API -#endif +#include "../Tests.h" class DLL_API Foo { diff --git a/tests/VTables/VTables.h b/tests/VTables/VTables.h index dae69f35..bc943312 100644 --- a/tests/VTables/VTables.h +++ b/tests/VTables/VTables.h @@ -1,8 +1,4 @@ -#if defined(_MSC_VER) -#define DLL_API __declspec(dllexport) -#else -#define DLL_API -#endif +#include "../Tests.h" class DLL_API Foo {