const core = @import("core"); const std = @import("std"); const memory = core.MemoryTracker; const engine_log = core.engine_log; const engine_logs = core.engine_logs; test "simple systems setup for core" { std.testing.refAllDecls(core.algorithm); memory.MTSetup(std.testing.allocator, .{ .timeline = false }); defer memory.MTShutdown(); const tracker = memory.MTGet().?; const allocator = tracker.allocator(); std.debug.print("Starting up \n", .{}); engine_logs("systems starting"); try core.start_module(.{ .name = "test" }, .{ .unitTest = true }, allocator); defer core.shutdown_module(allocator); engine_logs("systems started, shutting down"); memory.MTPrintStatsDelta(); try test_loadingConfigs(); try memory.dumpTimeline("test-core-timeline.txt"); } fn test_loadingConfigs() !void { if (core.getConfigVar(u32, "platform.extent.width")) |width| { core.engine_log("config: {d}", .{width}); } if (core.getConfigVar(u64, "platform.extent.height")) |height| { core.engine_log("config: {d}", .{height}); } if (core.getConfigVar(f32, "platform.extent.height")) |height| { core.engine_log("config f32: {d}", .{height}); } if (core.getConfigVar(f64, "platform.extent.height")) |height| { core.engine_log("config f64: {d}", .{height}); } if (core.getConfigVar([]const u8, "platform.windowName")) |height| { core.engine_log("config string: {s}", .{height}); } }