Files
iZo/tests/system_time_debug.cpp
GigabiteStudios 80c6bfce90
All checks were successful
Linux unit tests / unit-tests (push) Successful in 30s
docs(api): migrate consumers to CamelCase
2026-06-18 19:40:23 -05:00

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);
}