From 1c1b372decaa2fb7f9761c376f8b44d2e6e33c35 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 27 May 2020 22:07:38 +0200 Subject: Fix platform family checks (fixed pthreads on linux) --- tests/src/platformTest.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/src/platformTest.cpp (limited to 'tests/src') diff --git a/tests/src/platformTest.cpp b/tests/src/platformTest.cpp new file mode 100644 index 0000000..aecc3e4 --- /dev/null +++ b/tests/src/platformTest.cpp @@ -0,0 +1,14 @@ +#include +#include "../../include/Platform.hpp" + +using namespace sibs; + +TEST_CASE("platform same family") +{ + REQUIRE(isSamePlatformFamily(PLATFORM_LINUX, PLATFORM_LINUX_X86_64)); + REQUIRE(isSamePlatformFamily(PLATFORM_LINUX_X86_64, PLATFORM_LINUX)); + REQUIRE(!isSamePlatformFamily(PLATFORM_LINUX_X86_64, PLATFORM_MACOS)); + REQUIRE(!isSamePlatformFamily(PLATFORM_MACOS, PLATFORM_LINUX_X86_64)); + REQUIRE(!isSamePlatformFamily(PLATFORM_MACOS, PLATFORM_LINUX)); + REQUIRE(!isSamePlatformFamily(PLATFORM_LINUX, PLATFORM_MACOS)); +} -- cgit v1.2.3