lib.cpp 1.0 KB

123456789101112131415161718192021222324
  1. #include <entt/entity/registry.hpp>
  2. #include <gtest/gtest.h>
  3. extern typename entt::registry<>::component_type a_module_int_type();
  4. extern typename entt::registry<>::component_type a_module_char_type();
  5. extern typename entt::registry<>::component_type another_module_int_type();
  6. extern typename entt::registry<>::component_type another_module_char_type();
  7. TEST(Lib, Shared) {
  8. entt::registry<> registry;
  9. ASSERT_EQ(registry.type<int>(), registry.type<const int>());
  10. ASSERT_EQ(registry.type<char>(), registry.type<const char>());
  11. ASSERT_EQ(registry.type<int>(), a_module_int_type());
  12. ASSERT_EQ(registry.type<char>(), a_module_char_type());
  13. ASSERT_EQ(registry.type<const int>(), a_module_int_type());
  14. ASSERT_EQ(registry.type<const char>(), a_module_char_type());
  15. ASSERT_EQ(registry.type<const char>(), another_module_char_type());
  16. ASSERT_EQ(registry.type<const int>(), another_module_int_type());
  17. ASSERT_EQ(registry.type<char>(), another_module_char_type());
  18. ASSERT_EQ(registry.type<int>(), another_module_int_type());
  19. }