Skip to content

Commit 02aee02

Browse files
committed
Use _MSVC_TRADITIONAL instead of _MSC_VER
1 parent 706d472 commit 02aee02

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Release/tests/common/UnitTestpp/src/CheckMacros.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
#error UnitTest++ redefines VERIFY_IS_NULL
9595
#endif
9696

97-
#if defined(WIN32) && defined(_MSC_VER) && (_MSC_VER < 1926)
97+
#if !defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL
9898
#define VERIFY_IS_TRUE(expression, ...) CHECK_EQUAL(true, expression, __VA_ARGS__)
9999
#define VERIFY_IS_FALSE(expression, ...) CHECK_EQUAL(false, expression, __VA_ARGS__)
100100
#define VERIFY_ARE_NOT_EQUAL(expected, actual, ...) CHECK_NOT_EQUAL(expected, actual, __VA_ARGS__)
@@ -118,7 +118,7 @@
118118
UnitTest::TestDetails(*UnitTest::CurrentTest::Details(), __LINE__), #value); \
119119
UNITTEST_MULTILINE_MACRO_END
120120

121-
#if defined(WIN32) && defined(_MSC_VER) && (_MSC_VER < 1926)
121+
#if !defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL
122122

123123
#define CHECK_EQUAL(expected, actual, ...) \
124124
do \

Release/tests/common/UnitTestpp/src/TestMacros.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ extern "C" _DLL_EXPORT TestList& __cdecl GetTestList();
9393
} \
9494
namespace Suite##Name
9595

96-
#if defined(_WIN32) && defined(_MSC_VER) && (_MSC_VER < 1926)
96+
#if !defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL
9797
#define TEST_EX(Name, List, ...) \
9898
class Test##Name : public UnitTest::Test \
9999
{ \
@@ -124,13 +124,13 @@ extern "C" _DLL_EXPORT TestList& __cdecl GetTestList();
124124
void Test##Name::RunImpl() const
125125
#endif
126126

127-
#if defined(_WIN32) && defined(_MSC_VER) && (_MSC_VER < 1926)
127+
#if !defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL
128128
#define TEST(Name, ...) TEST_EX(Name, UnitTest::GetTestList(), __VA_ARGS__)
129129
#else
130130
#define TEST(Name, ...) TEST_EX(Name, UnitTest::GetTestList(), ##__VA_ARGS__)
131131
#endif
132132

133-
#if defined(_WIN32) && defined(_MSC_VER) && (_MSC_VER < 1926)
133+
#if !defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL
134134
#define TEST_FIXTURE_EX(Fixture, Name, List, ...) \
135135
class Fixture##Name##Helper : public Fixture \
136136
{ \
@@ -242,7 +242,7 @@ extern "C" _DLL_EXPORT TestList& __cdecl GetTestList();
242242
void Fixture##Name##Helper::RunImpl()
243243
#endif
244244

245-
#if defined(_WIN32) && defined(_MSC_VER) && (_MSC_VER < 1926)
245+
#if !defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL
246246
#define TEST_FIXTURE(Fixture, Name, ...) TEST_FIXTURE_EX(Fixture, Name, UnitTest::GetTestList(), __VA_ARGS__)
247247
#else
248248
#define TEST_FIXTURE(Fixture, Name, ...) TEST_FIXTURE_EX(Fixture, Name, UnitTest::GetTestList(), ##__VA_ARGS__)

0 commit comments

Comments
 (0)