diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 27a60ec87..329ee17d2 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -168,6 +168,7 @@ SETUP_BASIC_TEST(enum entt/core/enum.cpp) SETUP_BASIC_TEST(family entt/core/family.cpp) SETUP_BASIC_TEST(hashed_string entt/core/hashed_string.cpp) SETUP_BASIC_TEST(ident entt/core/ident.cpp) +SETUP_BASIC_TEST(memory entt/core/memory.cpp) SETUP_BASIC_TEST(monostate entt/core/monostate.cpp) SETUP_BASIC_TEST(type_info entt/core/type_info.cpp) SETUP_BASIC_TEST(type_traits entt/core/type_traits.cpp) diff --git a/test/entt/core/memory.cpp b/test/entt/core/memory.cpp new file mode 100644 index 000000000..09f770d45 --- /dev/null +++ b/test/entt/core/memory.cpp @@ -0,0 +1,11 @@ +#include +#include +#include + +TEST(Memory, Unfancy) { + std::shared_ptr shared = std::make_shared(); + auto *plain = std::addressof(*shared); + + ASSERT_EQ(entt::unfancy(shared), plain); + ASSERT_EQ(entt::unfancy(plain), plain); +}