diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-27 13:27:34 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-27 13:27:34 +0100 |
commit | 07d7c30d33a3adfc24031d63582ac0b7b71bd96b (patch) | |
tree | 8c958a810cd19b0de857276a542dfd1d43215fe6 /editor/tests-private.hpp | |
parent | 2828671f29154e244fd826b71e0458b2f7dfcba9 (diff) |
wip
Diffstat (limited to 'editor/tests-private.hpp')
-rw-r--r-- | editor/tests-private.hpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/editor/tests-private.hpp b/editor/tests-private.hpp index 7967256e..15c6abaf 100644 --- a/editor/tests-private.hpp +++ b/editor/tests-private.hpp @@ -5,8 +5,7 @@ #include "src/object-id.hpp" #include "floormat/events.hpp" #include <Corrade/Containers/StringView.h> -#include <memory> -#include <vector> +#include <Corrade/Containers/Pointer.h> namespace floormat { struct app; } @@ -34,7 +33,7 @@ protected: void label_left(StringView label, float width); enum class Test : uint32_t { - none, path, COUNT, + none, path, raycast, COUNT, }; struct tests_data final : tests_data_ @@ -43,22 +42,24 @@ struct tests_data final : tests_data_ void switch_to(Test i); - static std::unique_ptr<base_test> make_test_none(); - static std::unique_ptr<base_test> make_test_path(); + static Pointer<base_test> make_test_none(); + static Pointer<base_test> make_test_path(); + static Pointer<base_test> make_test_raycast(); - std::unique_ptr<base_test> current_test; + Pointer<base_test> current_test; Test current_index = Test::none; struct test_tuple { StringView name; Test t; - std::unique_ptr<base_test>(*ctor)(); + Pointer<base_test>(*ctor)(); }; static constexpr test_tuple fields[] = { { "None"_s, Test::none, &tests_data::make_test_none, }, { "Path"_s, Test::path, &tests_data::make_test_path, }, + { "Raycasting"_s, Test::raycast, &tests_data::make_test_raycast }, }; }; |