mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2025-06-20 03:36:37 +02:00
make tests auto terminate
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
#include <mm/services/sdl_service.hpp>
|
||||
#include <mm/services/organizer_scene.hpp>
|
||||
#include <mm/services/opengl_renderer.hpp>
|
||||
#include <mm/services/count_down.hpp>
|
||||
|
||||
#include <entt/entity/registry.hpp>
|
||||
#include <entt/entity/organizer.hpp>
|
||||
@ -51,6 +52,11 @@ TEST(tilemap_render_task_test, it) {
|
||||
auto& rs = engine.addService<MM::Services::OpenGLRenderer>();
|
||||
ASSERT_TRUE(engine.enableService<MM::Services::OpenGLRenderer>());
|
||||
|
||||
#ifdef MM_AUTOTEST
|
||||
engine.addService<MM::Services::CountDown>(50); // 50 frames
|
||||
ASSERT_TRUE(engine.enableService<MM::Services::CountDown>());
|
||||
#endif
|
||||
|
||||
rs.addRenderTask<MM::OpenGL::RenderTasks::Tilemap>(engine);
|
||||
|
||||
scene.on_construct<MM::Components::Position2D>().connect<&entt::registry::emplace_or_replace<MM::Components::Position2D_ZOffset>>();
|
||||
|
Reference in New Issue
Block a user