aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/src/platformTest.cpp14
1 files changed, 14 insertions, 0 deletions
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 <catch.hpp>
+#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));
+}