2026-06-18 19:32:27 -05:00
|
|
|
#include "test_support.hpp"
|
|
|
|
|
|
2026-06-18 19:40:23 -05:00
|
|
|
#include <izo/Debug.hpp>
|
|
|
|
|
#include <izo/System.hpp>
|
|
|
|
|
#include <izo/Time.hpp>
|
2026-06-18 19:32:27 -05:00
|
|
|
|
|
|
|
|
int main() {
|
2026-06-18 19:40:23 -05:00
|
|
|
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());
|
2026-06-18 19:32:27 -05:00
|
|
|
|
2026-06-18 19:40:23 -05:00
|
|
|
const auto before = izo::MonotonicNow();
|
|
|
|
|
izo::SleepFor(std::chrono::milliseconds(5));
|
|
|
|
|
CHECK(izo::MonotonicNow() > before);
|
|
|
|
|
izo::SleepFor(std::chrono::nanoseconds(-1));
|
2026-06-18 19:32:27 -05:00
|
|
|
|
2026-06-18 19:40:23 -05:00
|
|
|
(void)izo::IsDebuggerAttached();
|
|
|
|
|
izo::DebugOutput("iZo debug output test\n");
|
|
|
|
|
izo::InstallCrashHandler(nullptr);
|
2026-06-18 19:32:27 -05:00
|
|
|
}
|