refactor: minor renaming
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
light7734 2026-02-02 13:58:04 +03:30
parent da8eaa6aa4
commit 582b7c09c6
Signed by: light7734
GPG key ID: E7CE6145374F0B5F
3 changed files with 15 additions and 15 deletions

View file

@ -1,6 +1,6 @@
import preliminary; import preliminary;
import time; import time;
import test.expects; import logger;
import surface.system; import surface.system;
import surface.events; import surface.events;
import surface.requests; import surface.requests;
@ -20,6 +20,10 @@ constexpr auto visible = false;
auto main() -> i32 auto main() -> i32
try try
{ {
for (auto idx = 0; idx < 100; ++idx)
{
std::println("{}: \033[1;{}m| color |\033[0m", idx, idx);
}
auto registry = lt::memory::create_ref<lt::ecs::Registry>(); auto registry = lt::memory::create_ref<lt::ecs::Registry>();
auto system = lt::surface::System { registry }; auto system = lt::surface::System { registry };

View file

@ -1099,7 +1099,7 @@ void System::modify_resolution(SurfaceComponent &surface, const ModifyResolution
void System::modify_position(SurfaceComponent &surface, const ModifyPositionRequest &request) 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( SetWindowPos(
surface.m_native_data.window, surface.m_native_data.window,
{}, {},

View file

@ -133,7 +133,7 @@ Suite system_events = "system_events"_suite = [] {
}; };
Suite registry_events = "registry_events"_suite = [] { Suite registry_events = "registry_events"_suite = [] {
Case { "on_construct<SurfaceComponent> initializes component" } = [] { Case { "on_construct initializes component" } = [] {
auto fixture = Fixture {}; auto fixture = Fixture {};
const auto &component = fixture.create_component(); const auto &component = fixture.create_component();
@ -141,7 +141,7 @@ Suite registry_events = "registry_events"_suite = [] {
fixture.check_values(*component); fixture.check_values(*component);
}; };
Case { "unhappy on_construct<SurfaceComponent> throws" } = [] { Case { "unhappy on_construct throws" } = [] {
auto fixture = Fixture {}; auto fixture = Fixture {};
auto system = System { fixture.registry() }; auto system = System { fixture.registry() };
@ -168,7 +168,7 @@ Suite registry_events = "registry_events"_suite = [] {
}); });
}; };
Case { "unhappy on_construct<SurfaceComponent> removes component" } = [] { Case { "unhappy on_construct removes component" } = [] {
auto fixture = Fixture {}; auto fixture = Fixture {};
auto system = System { fixture.registry() }; auto system = System { fixture.registry() };
@ -176,7 +176,7 @@ Suite registry_events = "registry_events"_suite = [] {
expect_eq(fixture.registry()->view<SurfaceComponent>().get_size(), 0); expect_eq(fixture.registry()->view<SurfaceComponent>().get_size(), 0);
}; };
Case { "on_destrroy<SurfaceComponent> cleans up component" } = [] { Case { "on_destroy cleans up component" } = [] {
auto fixture = Fixture {}; auto fixture = Fixture {};
auto system = lt::memory::create_scope<System>(fixture.registry()); auto system = lt::memory::create_scope<System>(fixture.registry());
@ -189,23 +189,21 @@ Suite registry_events = "registry_events"_suite = [] {
}; };
}; };
Suite tick = "tick"_suite = [] { Suite tick = "ticking"_suite = [] {
Case { "ticking on empty registry won't throw" } = [] { Case { "on empty registry won't throw" } = [] {
auto fixture = Fixture {}; auto fixture = Fixture {};
System { fixture.registry() }.tick(tick_info()); 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 fixture = Fixture {};
auto system = System { fixture.registry() }; auto system = System { fixture.registry() };
fixture.create_component(); fixture.create_component();
system.tick(tick_info()); system.tick(tick_info());
}; };
};
Suite tick_handles_events = "tick_handles_events"_suite = [] { Case { "clears previous tick's events" } = [] {
Case { "ticking clears previous tick's events" } = [] {
auto fixture = Fixture {}; auto fixture = Fixture {};
auto system = System { fixture.registry() }; auto system = System { fixture.registry() };
auto &surface = **fixture.create_component(); auto &surface = **fixture.create_component();
@ -223,10 +221,8 @@ Suite tick_handles_events = "tick_handles_events"_suite = [] {
system.tick(tick_info()); system.tick(tick_info());
expect_eq(surface.peek_events().size(), 0); expect_eq(surface.peek_events().size(), 0);
}; };
};
Suite tick_handles_requests = "tick_handles_requests"_suite = [] { Case { "clears requests" } = [] {
Case { "ticking clears requests" } = [] {
auto fixture = Fixture {}; auto fixture = Fixture {};
auto system = System { fixture.registry() }; auto system = System { fixture.registry() };
auto &surface = **fixture.create_component(); auto &surface = **fixture.create_component();