mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2025-06-19 03:06:37 +02:00
make tests auto terminate
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
#include "nlohmann/json_fwd.hpp"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <mm/engine.hpp>
|
||||
@ -8,6 +7,7 @@
|
||||
#include <mm/services/filesystem.hpp>
|
||||
#include <mm/services/opengl_renderer.hpp>
|
||||
#include <mm/services/imgui_s.hpp>
|
||||
#include <mm/services/count_down.hpp>
|
||||
|
||||
#include <mm/opengl/render_tasks/imgui.hpp>
|
||||
|
||||
@ -183,9 +183,13 @@ TEST(imgui_json_editor, basic) {
|
||||
};
|
||||
|
||||
engine.addService<TestWindow>(); // engine dtr ?????????????????
|
||||
|
||||
ASSERT_TRUE(engine.enableService<TestWindow>());
|
||||
|
||||
#ifdef MM_AUTOTEST
|
||||
engine.addService<MM::Services::CountDown>(50); // 50 frames
|
||||
ASSERT_TRUE(engine.enableService<MM::Services::CountDown>());
|
||||
#endif
|
||||
|
||||
engine.run();
|
||||
|
||||
sdl_ss.destroyWindow();
|
||||
|
Reference in New Issue
Block a user