Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
geugenm committed Jun 26, 2023
1 parent 1487c7b commit ba5aff5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
12 changes: 10 additions & 2 deletions test/test_entt.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#include <thread>

#include <tracy/Tracy.hpp>

TEST(GameSystemTest, UpdateAndHandleEvents)
{
entt::registry main_registry;
Expand All @@ -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);
Expand Down

0 comments on commit ba5aff5

Please # to comment.