From 347a16666c732ad2b4af977ed4ce9a7529400241 Mon Sep 17 00:00:00 2001 From: scawful Date: Tue, 13 Aug 2024 18:05:56 -0400 Subject: [PATCH] setup integration::TestEditor in yaze_test.cc --- src/test/yaze_test.cc | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/test/yaze_test.cc b/src/test/yaze_test.cc index 2772a521..c1fa622e 100644 --- a/src/test/yaze_test.cc +++ b/src/test/yaze_test.cc @@ -5,6 +5,10 @@ #include "absl/debugging/failure_signal_handler.h" #include "absl/debugging/symbolize.h" +#include "app/core/controller.h" +#include "imgui/imgui.h" +#include "imgui_test_engine/imgui_te_engine.h" +#include "test/integration/test_editor.h" int main(int argc, char* argv[]) { absl::InitializeSymbolizer(argv[0]); @@ -17,7 +21,25 @@ int main(int argc, char* argv[]) { // Check if the argument says `integration` if (argc > 1 && std::string(argv[1]) == "integration") { - // TODO: Create the debugging window with the test engine. + yaze_test::integration::TestEditor test_editor; + yaze::app::core::Controller controller; + controller.init_test_editor(&test_editor); + + auto entry = controller.OnEntry(); + if (!entry.ok()) { + return EXIT_FAILURE; + } + + while (controller.IsActive()) { + controller.OnInput(); + if (!controller.OnLoad().ok()) { + return EXIT_FAILURE; + } + controller.DoRender(); + } + + controller.OnExit(); + return EXIT_SUCCESS; }