24 lines
705 B
C++
24 lines
705 B
C++
#include "test_support.hpp"
|
|
|
|
#include <izo/debug.hpp>
|
|
#include <izo/system.hpp>
|
|
#include <izo/time.hpp>
|
|
|
|
int main() {
|
|
const auto info = izo::get_system_info();
|
|
CHECK(info.logical_cpu_count > 0);
|
|
CHECK(info.total_memory_bytes > 0);
|
|
CHECK(info.available_memory_bytes <= info.total_memory_bytes);
|
|
CHECK(info.os_name == "Linux");
|
|
CHECK(!info.os_version.empty());
|
|
|
|
const auto before = izo::monotonic_now();
|
|
izo::sleep_for(std::chrono::milliseconds(5));
|
|
CHECK(izo::monotonic_now() > before);
|
|
izo::sleep_for(std::chrono::nanoseconds(-1));
|
|
|
|
(void)izo::is_debugger_attached();
|
|
izo::debug_output("iZo debug output test\n");
|
|
izo::install_crash_handler(nullptr);
|
|
}
|