diff options
Diffstat (limited to 'src/unittests')
-rw-r--r-- | src/unittests/catch.hpp | 4 | ||||
-rw-r--r-- | src/unittests/doctest.h | 5 | ||||
-rw-r--r-- | src/unittests/fs/files.cc | 6 | ||||
-rw-r--r-- | src/unittests/resources/resourcemanager/resourcemanager.cc | 1 | ||||
-rw-r--r-- | src/unittests/utils/dumplibs.cc | 7 |
5 files changed, 15 insertions, 8 deletions
diff --git a/src/unittests/catch.hpp b/src/unittests/catch.hpp index 64d1cafc4..f51e1ab35 100644 --- a/src/unittests/catch.hpp +++ b/src/unittests/catch.hpp @@ -1999,7 +1999,7 @@ namespace Catch { #define CATCH_PLATFORM_MAC #elif defined(__IPHONE_OS_VERSION_MIN_REQUIRED) #define CATCH_PLATFORM_IPHONE -#elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) +#elif defined(_WIN32) || defined(__WIN32__) || defined(_MSC_VER) #define CATCH_PLATFORM_WINDOWS #endif @@ -3940,7 +3940,7 @@ namespace Tbc { #include <stdexcept> #include <memory> -#if defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) +#if defined(_WIN32) || defined(__WIN32__) || defined(_MSC_VER) #define CLARA_PLATFORM_WINDOWS #endif diff --git a/src/unittests/doctest.h b/src/unittests/doctest.h index c7a745bb0..02d187480 100644 --- a/src/unittests/doctest.h +++ b/src/unittests/doctest.h @@ -264,6 +264,7 @@ DOCTEST_MSVC_SUPPRESS_WARNING(26444) // Avoid unnamed objects with custom constr #if !defined(_WIN32) && !defined(__QNX__) && !defined(DOCTEST_CONFIG_POSIX_SIGNALS) #define DOCTEST_CONFIG_POSIX_SIGNALS #endif // _WIN32 + #if defined(DOCTEST_CONFIG_NO_POSIX_SIGNALS) && defined(DOCTEST_CONFIG_POSIX_SIGNALS) #undef DOCTEST_CONFIG_POSIX_SIGNALS #endif // DOCTEST_CONFIG_NO_POSIX_SIGNALS @@ -294,10 +295,10 @@ DOCTEST_MSVC_SUPPRESS_WARNING(26444) // Avoid unnamed objects with custom constr #if DOCTEST_MSVC #define DOCTEST_SYMBOL_EXPORT __declspec(dllexport) #define DOCTEST_SYMBOL_IMPORT __declspec(dllimport) -#else // MSVC +#else // DOCTEST_MSVC #define DOCTEST_SYMBOL_EXPORT __attribute__((dllexport)) #define DOCTEST_SYMBOL_IMPORT __attribute__((dllimport)) -#endif // MSVC +#endif // DOCTEST_MSVC #else // _WIN32 #define DOCTEST_SYMBOL_EXPORT __attribute__((visibility("default"))) #define DOCTEST_SYMBOL_IMPORT diff --git a/src/unittests/fs/files.cc b/src/unittests/fs/files.cc index 767c4b5e8..9255195ca 100644 --- a/src/unittests/fs/files.cc +++ b/src/unittests/fs/files.cc @@ -116,12 +116,12 @@ TEST_CASE("Files saveTextFile", "") Files::saveTextFile(dir, "tempfile.txt", "test line\ntext line2"); std::string data = VirtFs::loadTextFileString("test/tempfile.txt"); ::remove((dir + "/tempfile.txt").c_str()); -#ifdef WIN32 +#ifdef _WIN32 REQUIRE(data == "test line\r\ntext line2\r\n"); -#else // WIN32 +#else // _WIN32 REQUIRE(data == "test line\ntext line2\n"); -#endif // WIN32 +#endif // _WIN32 ResourceManager::deleteInstance(); VirtFs::unmountDirSilent("data"); diff --git a/src/unittests/resources/resourcemanager/resourcemanager.cc b/src/unittests/resources/resourcemanager/resourcemanager.cc index c536a7186..984c25103 100644 --- a/src/unittests/resources/resourcemanager/resourcemanager.cc +++ b/src/unittests/resources/resourcemanager/resourcemanager.cc @@ -40,6 +40,7 @@ #include "utils/env.h" #include "utils/delete2.h" +#include "utils/performance.h" #include <unistd.h> diff --git a/src/unittests/utils/dumplibs.cc b/src/unittests/utils/dumplibs.cc index 594c90501..f23b2b7ec 100644 --- a/src/unittests/utils/dumplibs.cc +++ b/src/unittests/utils/dumplibs.cc @@ -57,7 +57,12 @@ TEST_CASE("dumplibs tests", "") #ifdef ENABLE_LIBXML SECTION("libxml2") { - const char *const *xmlVersion = __xmlParserVersion(); + const char *const *xmlVersion +#if LIBXML_VERSION > 21200 + = &xmlParserVersion; +#else + = __xmlParserVersion(); +#endif REQUIRE(xmlVersion != nullptr); REQUIRE(*xmlVersion != nullptr); REQUIRE(std::string(*xmlVersion) == |