diff options
author | 2015-05-30 14:57:13 +0200 | |
---|---|---|
committer | 2015-05-30 14:57:13 +0200 | |
commit | d1d9dfc2d4be85cee8c8c990950d72ee6df78e5e (patch) | |
tree | 495d4e5a066ee13be131f08437732b3588d43a42 /3rdparty/unittest-cpp/UnitTest++/HelperMacros.h | |
parent | fe71f92dd24270ae7c5621166b096c665ca0e4f5 (diff) | |
parent | 51709eef04f9f0c6d621447c568e170927fa9472 (diff) |
Merge pull request #4 from mamedev/master
Sync to base master
Diffstat (limited to '3rdparty/unittest-cpp/UnitTest++/HelperMacros.h')
-rw-r--r-- | 3rdparty/unittest-cpp/UnitTest++/HelperMacros.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/3rdparty/unittest-cpp/UnitTest++/HelperMacros.h b/3rdparty/unittest-cpp/UnitTest++/HelperMacros.h new file mode 100644 index 00000000000..699d99d9bd3 --- /dev/null +++ b/3rdparty/unittest-cpp/UnitTest++/HelperMacros.h @@ -0,0 +1,52 @@ +#ifndef UNITTEST_HELPERMACROS_H +#define UNITTEST_HELPERMACROS_H + +#include "Config.h" + +#define UNITTEST_MULTILINE_MACRO_BEGIN do { + +#if defined(UNITTEST_WIN32) && !defined(UNITTEST_COMPILER_IS_MSVC6) + #define UNITTEST_MULTILINE_MACRO_END \ + } __pragma(warning(push)) __pragma(warning(disable:4127)) while (0) __pragma(warning(pop)) +#else + #define UNITTEST_MULTILINE_MACRO_END } while(0) +#endif + + +#ifdef UNITTEST_WIN32_DLL + #define UNITTEST_IMPORT __declspec(dllimport) + #define UNITTEST_EXPORT __declspec(dllexport) + + #ifdef UNITTEST_DLL_EXPORT + #define UNITTEST_LINKAGE UNITTEST_EXPORT + #define UNITTEST_IMPEXP_TEMPLATE + #else + #define UNITTEST_LINKAGE UNITTEST_IMPORT + #define UNITTEST_IMPEXP_TEMPLATE extern + #endif + + #define UNITTEST_STDVECTOR_LINKAGE(T) \ + __pragma(warning(push)) \ + __pragma(warning(disable:4231)) \ + UNITTEST_IMPEXP_TEMPLATE template class UNITTEST_LINKAGE std::allocator< T >; \ + UNITTEST_IMPEXP_TEMPLATE template class UNITTEST_LINKAGE std::vector< T >; \ + __pragma(warning(pop)) +#else + #define UNITTEST_IMPORT + #define UNITTEST_EXPORT + #define UNITTEST_LINKAGE + #define UNITTEST_IMPEXP_TEMPLATE + #define UNITTEST_STDVECTOR_LINKAGE(T) +#endif + +#ifdef UNITTEST_WIN32 + #define UNITTEST_JMPBUF jmp_buf + #define UNITTEST_SETJMP setjmp + #define UNITTEST_LONGJMP longjmp +#elif defined UNITTEST_POSIX + #define UNITTEST_JMPBUF std::jmp_buf + #define UNITTEST_SETJMP setjmp + #define UNITTEST_LONGJMP std::longjmp +#endif + +#endif |