forked from Green-Sky/tomato
Squashed 'external/entt/entt/' content from commit fef92113
git-subtree-dir: external/entt/entt git-subtree-split: fef921132cae7588213d0f9bcd2fb9c8ffd8b7fc
This commit is contained in:
22
test/entt/core/family.cpp
Normal file
22
test/entt/core/family.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#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::value<int>;
|
||||
auto t2 = a_family::value<int>;
|
||||
auto t3 = a_family::value<char>;
|
||||
auto t4 = another_family::value<double>;
|
||||
|
||||
ASSERT_EQ(t1, t2);
|
||||
ASSERT_NE(t1, t3);
|
||||
ASSERT_EQ(t1, t4);
|
||||
}
|
||||
|
||||
TEST(Family, Uniqueness) {
|
||||
ASSERT_NE(a_family::value<int>, a_family::value<int &>);
|
||||
ASSERT_NE(a_family::value<int>, a_family::value<int &&>);
|
||||
ASSERT_NE(a_family::value<int>, a_family::value<const int &>);
|
||||
}
|
||||
Reference in New Issue
Block a user