diff --git a/modules/sandbox/sandbox.cpp b/modules/sandbox/sandbox.cpp index 7bff5c5..3e5eb69 100644 --- a/modules/sandbox/sandbox.cpp +++ b/modules/sandbox/sandbox.cpp @@ -1,6 +1,6 @@ import preliminary; import time; -import test.expects; +import logger; import surface.system; import surface.events; import surface.requests; @@ -20,6 +20,10 @@ constexpr auto visible = false; auto main() -> i32 try { + for (auto idx = 0; idx < 100; ++idx) + { + std::println("{}: \033[1;{}m| color |\033[0m", idx, idx); + } auto registry = lt::memory::create_ref(); auto system = lt::surface::System { registry }; diff --git a/modules/surface/system.cppm b/modules/surface/system.cppm index 973ad5d..c617260 100644 --- a/modules/surface/system.cppm +++ b/modules/surface/system.cppm @@ -1099,7 +1099,7 @@ void System::modify_resolution(SurfaceComponent &surface, const ModifyResolution void System::modify_position(SurfaceComponent &surface, const ModifyPositionRequest &request) { - log::debug("Setting window position to: {}, {}", request.position.x, request.position.y); + // log::debug("Setting window position to: {}, {}", request.position.x, request.position.y); SetWindowPos( surface.m_native_data.window, {}, diff --git a/modules/surface/system.test.cpp b/modules/surface/system.test.cpp index 48e39fb..6555204 100644 --- a/modules/surface/system.test.cpp +++ b/modules/surface/system.test.cpp @@ -133,7 +133,7 @@ Suite system_events = "system_events"_suite = [] { }; Suite registry_events = "registry_events"_suite = [] { - Case { "on_construct initializes component" } = [] { + Case { "on_construct initializes component" } = [] { auto fixture = Fixture {}; const auto &component = fixture.create_component(); @@ -141,7 +141,7 @@ Suite registry_events = "registry_events"_suite = [] { fixture.check_values(*component); }; - Case { "unhappy on_construct throws" } = [] { + Case { "unhappy on_construct throws" } = [] { auto fixture = Fixture {}; auto system = System { fixture.registry() }; @@ -168,7 +168,7 @@ Suite registry_events = "registry_events"_suite = [] { }); }; - Case { "unhappy on_construct removes component" } = [] { + Case { "unhappy on_construct removes component" } = [] { auto fixture = Fixture {}; auto system = System { fixture.registry() }; @@ -176,7 +176,7 @@ Suite registry_events = "registry_events"_suite = [] { expect_eq(fixture.registry()->view().get_size(), 0); }; - Case { "on_destrroy cleans up component" } = [] { + Case { "on_destroy cleans up component" } = [] { auto fixture = Fixture {}; auto system = lt::memory::create_scope(fixture.registry()); @@ -189,23 +189,21 @@ Suite registry_events = "registry_events"_suite = [] { }; }; -Suite tick = "tick"_suite = [] { - Case { "ticking on empty registry won't throw" } = [] { +Suite tick = "ticking"_suite = [] { + Case { "on empty registry won't throw" } = [] { auto fixture = Fixture {}; System { fixture.registry() }.tick(tick_info()); }; - Case { "ticking on non-empty registry won't throw" } = [] { + Case { "on non-empty registry won't throw" } = [] { auto fixture = Fixture {}; auto system = System { fixture.registry() }; fixture.create_component(); system.tick(tick_info()); }; -}; -Suite tick_handles_events = "tick_handles_events"_suite = [] { - Case { "ticking clears previous tick's events" } = [] { + Case { "clears previous tick's events" } = [] { auto fixture = Fixture {}; auto system = System { fixture.registry() }; auto &surface = **fixture.create_component(); @@ -223,10 +221,8 @@ Suite tick_handles_events = "tick_handles_events"_suite = [] { system.tick(tick_info()); expect_eq(surface.peek_events().size(), 0); }; -}; -Suite tick_handles_requests = "tick_handles_requests"_suite = [] { - Case { "ticking clears requests" } = [] { + Case { "clears requests" } = [] { auto fixture = Fixture {}; auto system = System { fixture.registry() }; auto &surface = **fixture.create_component();