From affbc668df1746f25c19c3a5d707d38dcba1d616 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Thu, 4 Apr 2024 22:58:47 +0200 Subject: [PATCH] test: storage type checks --- test/entt/entity/storage.cpp | 2 ++ test/entt/entity/storage_no_instance.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/test/entt/entity/storage.cpp b/test/entt/entity/storage.cpp index f61bb0147..bf61dd7dc 100644 --- a/test/entt/entity/storage.cpp +++ b/test/entt/entity/storage.cpp @@ -68,6 +68,8 @@ struct entt::component_traits> { template struct Storage: testing::Test { + static_assert(entt::component_traits::page_size != 0u, "Empty type not allowed"); + using type = Type; }; diff --git a/test/entt/entity/storage_no_instance.cpp b/test/entt/entity/storage_no_instance.cpp index d025b929c..94ed1352e 100644 --- a/test/entt/entity/storage_no_instance.cpp +++ b/test/entt/entity/storage_no_instance.cpp @@ -16,6 +16,8 @@ template struct StorageNoInstance: testing::Test { + static_assert(entt::component_traits::page_size == 0u, "Non-empty type not allowed"); + using type = Type; static auto emplace_instance(entt::storage &pool, const entt::entity entt) {