All checks were successful
Linux unit tests / unit-tests (push) Successful in 30s
24 lines
684 B
C++
24 lines
684 B
C++
#include "test_support.hpp"
|
|
|
|
#include <izo/Debug.hpp>
|
|
#include <izo/System.hpp>
|
|
#include <izo/Time.hpp>
|
|
|
|
int main() {
|
|
const auto info = izo::GetSystemInfo();
|
|
CHECK(info.logicalCpuCount > 0);
|
|
CHECK(info.totalMemoryBytes > 0);
|
|
CHECK(info.availableMemoryBytes <= info.totalMemoryBytes);
|
|
CHECK(info.osName == "Linux");
|
|
CHECK(!info.osVersion.empty());
|
|
|
|
const auto before = izo::MonotonicNow();
|
|
izo::SleepFor(std::chrono::milliseconds(5));
|
|
CHECK(izo::MonotonicNow() > before);
|
|
izo::SleepFor(std::chrono::nanoseconds(-1));
|
|
|
|
(void)izo::IsDebuggerAttached();
|
|
izo::DebugOutput("iZo debug output test\n");
|
|
izo::InstallCrashHandler(nullptr);
|
|
}
|