summaryrefslogtreecommitdiffstats
path: root/fastos/src/tests
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2019-03-12 11:06:51 +0100
committerTor Egge <Tor.Egge@broadpark.no>2019-03-12 11:07:50 +0100
commitff3110a8fb51c1369d0877de68e2d06ba636e950 (patch)
tree22c36949951a123485e6f8480962bd4aa80cd531 /fastos/src/tests
parenta4cab61c260b1ef166d592ede3b51dcbfbb13445 (diff)
Restore support for compiling fastos on darwin.
Diffstat (limited to 'fastos/src/tests')
-rw-r--r--fastos/src/tests/backtracetest.cpp2
-rw-r--r--fastos/src/tests/filetest.cpp2
-rw-r--r--fastos/src/tests/timetest.cpp4
3 files changed, 5 insertions, 3 deletions
diff --git a/fastos/src/tests/backtracetest.cpp b/fastos/src/tests/backtracetest.cpp
index 6c68765c1ee..8fa3b42bfc9 100644
--- a/fastos/src/tests/backtracetest.cpp
+++ b/fastos/src/tests/backtracetest.cpp
@@ -6,7 +6,7 @@
#include "tests.h"
-#if defined __x86_64__
+#if defined(__x86_64__) && defined(__linux__)
class Tracker
{
private:
diff --git a/fastos/src/tests/filetest.cpp b/fastos/src/tests/filetest.cpp
index 43051dd1667..15f8ccb526b 100644
--- a/fastos/src/tests/filetest.cpp
+++ b/fastos/src/tests/filetest.cpp
@@ -813,7 +813,9 @@ public:
ScanDirectoryTest();
ReadBufTest();
MemoryMapTest(0);
+#ifdef __linux__
MemoryMapTest(MAP_HUGETLB);
+#endif
PrintSeparator();
printf("END OF TEST (%s)\n", _argv[0]);
diff --git a/fastos/src/tests/timetest.cpp b/fastos/src/tests/timetest.cpp
index 0618e28bcd0..c0c49884fb1 100644
--- a/fastos/src/tests/timetest.cpp
+++ b/fastos/src/tests/timetest.cpp
@@ -260,8 +260,8 @@ public:
using fastos::TimeStamp;
Progress(TimeStamp(97).ns() == 97l, "TimeStamp(int)");
Progress(TimeStamp(97u).ns() == 97l, "TimeStamp(unsigned int)");
- Progress(TimeStamp(97l).ns() == 97l, "TimeStamp(long)");
- Progress(TimeStamp(97ul).ns() == 97l, "TimeStamp(unsigned long)");
+ Progress(TimeStamp(INT64_C(97)).ns() == 97l, "TimeStamp(int64_t)");
+ Progress(TimeStamp(UINT64_C(97)).ns() == 97l, "TimeStamp(uint64_t)");
Progress(TimeStamp(TimeStamp::Seconds(97.3)).ns() == 97300000000l, "TimeStamp(double)");
PrintSeparator();
}