#include #include #include #include #include #include #include #include #include #include #include #include #include static char* argv0; using namespace entt::literals; TEST(imgui_scene_tools, it) { MM::Engine engine; auto& sdl_ss = engine.addService(SDL_INIT_VIDEO); ASSERT_TRUE(engine.enableService()); sdl_ss.createGLWindow("imgui_scene_tools_test", 1280, 720); engine.addService(argv0, "imgui_scene_tools_test"); ASSERT_TRUE(engine.enableService()); engine.addService(); ASSERT_TRUE(engine.enableService()); bool provide_ret = engine.provide(); ASSERT_TRUE(provide_ret); engine.addService(); ASSERT_TRUE(engine.enableService()); engine.addService(); ASSERT_TRUE(engine.enableService()); engine.addService(); ASSERT_TRUE(engine.enableService()); engine.addService(); //engine.getUpdateStrategy().depend("ImGuiSceneToolsService::render"_hs, "SimpleSceneService::scene_tick"_hs); auto& rs = engine.addService(); ASSERT_TRUE(engine.enableService()); ASSERT_TRUE(engine.enableService()); #ifdef MM_AUTOTEST engine.addService(50); // 50 frames ASSERT_TRUE(engine.enableService()); #endif rs.addRenderTask(engine); engine.run(); // TODO: clear asset manager sdl_ss.destroyWindow(); } int main(int argc, char** argv) { argv0 = argv[0]; ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); }