From ba5aff5bd2568cb967a319d1dfb457fe8eeff17d Mon Sep 17 00:00:00 2001 From: Eugene Date: Tue, 27 Jun 2023 02:09:48 +0300 Subject: [PATCH] ... --- test/CMakeLists.txt | 3 ++- test/test_entt.cxx | 12 ++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index c0e5df8..9afd416 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -13,5 +13,6 @@ if (BUILD_TESTS) enable_testing() add_test_executable(test_entt test_entt.cxx) - target_link_libraries(test_entt PUBLIC engine_sdk EnTT::EnTT) + target_link_libraries(test_entt PUBLIC engine_sdk EnTT::EnTT Tracy::TracyClient) + target_compile_options(test_entt PRIVATE -fPIE) endif () \ No newline at end of file diff --git a/test/test_entt.cxx b/test/test_entt.cxx index 4c6a426..5f4ec42 100644 --- a/test/test_entt.cxx +++ b/test/test_entt.cxx @@ -3,6 +3,8 @@ #include +#include + TEST(GameSystemTest, UpdateAndHandleEvents) { entt::registry main_registry; @@ -12,9 +14,15 @@ TEST(GameSystemTest, UpdateAndHandleEvents) { std::this_thread::sleep_for(std::chrono::milliseconds(1000 / 60)); - system.update(main_registry); + { + ZoneScopedNC("Frame beginning.", 1); + system.update(main_registry); + } - system.handle_events(main_registry); + { + ZoneScopedNC("Event handling.", 2); + system.handle_events(main_registry); + } } assert(system.is_initialized(main_registry) == false);