🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
645 B

#include <gtest/gtest.h>
#include <entt/core/family.hpp>
using a_family = entt::family<struct a_family_type>;
using another_family = entt::family<struct another_family_type>;
TEST(Family, Functionalities) {
auto t1 = a_family::type<int>;
auto t2 = a_family::type<int>;
auto t3 = a_family::type<char>;
auto t4 = another_family::type<double>;
ASSERT_EQ(t1, t2);
ASSERT_NE(t1, t3);
ASSERT_EQ(t1, t4);
}
TEST(Family, Uniqueness) {
ASSERT_EQ(a_family::type<int>, a_family::type<int &>);
ASSERT_EQ(a_family::type<int>, a_family::type<int &&>);
ASSERT_EQ(a_family::type<int>, a_family::type<const int &>);
}