#include #include #include #include #include namespace { struct NodeTag; struct ElementTag; using NodeId = fesa::EntityId; using ElementId = fesa::EntityId; static_assert(std::is_constructible_v); static_assert(!std::is_convertible_v); static_assert(!std::is_convertible_v); TEST(EntityId, PreservesValueAndSupportsTypedOrdering) { constexpr NodeId first{7}; constexpr NodeId second{11}; static_assert(first.value() == 7); static_assert(first < second); EXPECT_EQ(first.value(), 7); EXPECT_LT(first, second); } TEST(EntityId, RejectsNegativeValues) { EXPECT_THROW((NodeId{-1}), std::invalid_argument); } } // namespace