test: storage type checks

This commit is contained in:
Michele Caini
2024-04-04 22:58:47 +02:00
parent 6ede10fa47
commit affbc668df
2 changed files with 4 additions and 0 deletions

View File

@@ -68,6 +68,8 @@ struct entt::component_traits<std::unordered_set<char>> {
template<typename Type>
struct Storage: testing::Test {
static_assert(entt::component_traits<Type>::page_size != 0u, "Empty type not allowed");
using type = Type;
};

View File

@@ -16,6 +16,8 @@
template<typename Type>
struct StorageNoInstance: testing::Test {
static_assert(entt::component_traits<Type>::page_size == 0u, "Non-empty type not allowed");
using type = Type;
static auto emplace_instance(entt::storage<type> &pool, const entt::entity entt) {