diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-03-19 14:29:48 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-03-20 08:18:03 +0100 |
commit | f3c46930b43707e57979f08c85d53974f688380d (patch) | |
tree | 0b0e363ffe91ba50b3381011fddad7aceacbc497 /editor/tests | |
parent | 9629cfc4a97241a01654518dd7b8b2636e415866 (diff) |
pass dt to tests
Diffstat (limited to 'editor/tests')
-rw-r--r-- | editor/tests/path-test.cpp | 11 | ||||
-rw-r--r-- | editor/tests/pathfinding.cpp | 8 | ||||
-rw-r--r-- | editor/tests/raycast-test.cpp | 4 | ||||
-rw-r--r-- | editor/tests/region-test.cpp | 6 |
4 files changed, 12 insertions, 17 deletions
diff --git a/editor/tests/path-test.cpp b/editor/tests/path-test.cpp index 9f837128..cc7dc796 100644 --- a/editor/tests/path-test.cpp +++ b/editor/tests/path-test.cpp @@ -22,8 +22,8 @@ struct path_test final : base_test bool handle_mouse_move(app& a, const mouse_move_event& e) override; void draw_overlay(app& a) override; void draw_ui(app& a, float width) override; - void update_pre(app& a) override; - void update_post(app& a) override; + void update_pre(app& a, const Ns& dt) override; + void update_post(app&, const Ns&) override {} struct pending_s { @@ -144,7 +144,7 @@ void path_test::draw_overlay(app& a) } } -void path_test::update_pre(app& a) +void path_test::update_pre(app& a, const Ns&) { if (!has_pending) return; @@ -169,11 +169,6 @@ void path_test::update_pre(app& a) }; } -void path_test::update_post(app& a) -{ - (void)a; -} - void path_test::draw_ui(app&, float) { constexpr ImGuiTableFlags table_flags = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_ScrollY; diff --git a/editor/tests/pathfinding.cpp b/editor/tests/pathfinding.cpp index 303277c6..3299a626 100644 --- a/editor/tests/pathfinding.cpp +++ b/editor/tests/pathfinding.cpp @@ -78,8 +78,8 @@ struct pf_test final : base_test bool handle_mouse_move(app& a, const mouse_move_event&) override { return {}; } void draw_overlay(app& a) override; void draw_ui(app& a, float menu_bar_height) override; - void update_pre(app& a) override; - void update_post(app& a) override; + void update_pre(app& a, const Ns& dt) override; + void update_post(app& a, const Ns& dt) override; }; step_s pf_test::get_next_step(point from, point to) @@ -117,7 +117,7 @@ void pf_test::draw_ui(app& a, float) (void)a; } -void pf_test::update_pre(app& a) +void pf_test::update_pre(app& a, const Ns& dt) { if (!pending.has_value) return; @@ -127,7 +127,7 @@ void pf_test::update_pre(app& a) auto& c = *a.ensure_player_character(m.world()).ptr; } -void pf_test::update_post(app& a) +void pf_test::update_post(app& a, const Ns&) { } diff --git a/editor/tests/raycast-test.cpp b/editor/tests/raycast-test.cpp index 13199244..383264e7 100644 --- a/editor/tests/raycast-test.cpp +++ b/editor/tests/raycast-test.cpp @@ -252,12 +252,12 @@ struct raycast_test final : base_test } } - void update_pre(app&) override + void update_pre(app&, const Ns&) override { } - void update_post(app& a) override + void update_post(app& a, const Ns&) override { if (pending.exists) { diff --git a/editor/tests/region-test.cpp b/editor/tests/region-test.cpp index e24447c4..ca8addf3 100644 --- a/editor/tests/region-test.cpp +++ b/editor/tests/region-test.cpp @@ -52,8 +52,8 @@ struct region_test final : base_test bool handle_mouse_move(app&, const mouse_move_event&) override { return {}; } void draw_overlay(app& a) override; void draw_ui(app&, float) override; - void update_pre(app&) override {} - void update_post(app& a) override; + void update_pre(app&, const Ns&) override {} + void update_post(app& a, const Ns&) override; }; void region_test::draw_overlay(app& a) @@ -139,7 +139,7 @@ bool region_test::handle_mouse_click(app& a, const mouse_button_event& e, bool i return false; } -void region_test::update_post(app& a) +void region_test::update_post(app& a, const Ns&) { if (pending.exists) { |