summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-08-25 19:28:32 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-08-25 19:28:32 +0200
commitb147a0daa1be2c5e7faea33f500e7f22541c12a0 (patch)
treee24f5b4a7d3810b4d306d2727e621bd2d9848358 /test
parent1ef440478f7861d7d399fa570df950b02626c46e (diff)
entities: add intents for metadata
It's going to be used for serialization which has different fields.
Diffstat (limited to 'test')
-rw-r--r--test/entity.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/entity.cpp b/test/entity.cpp
index 1ae77129..3c099a37 100644
--- a/test/entity.cpp
+++ b/test/entity.cpp
@@ -20,7 +20,7 @@ struct TestAccessors {
namespace floormat::entities {
-template<> struct entity_accessors<TestAccessors> {
+template<> struct entity_accessors<TestAccessors, inspect_intent_t> {
static constexpr auto accessors()
{
using entity = Entity<TestAccessors>;
@@ -126,7 +126,7 @@ void test_erasure() {
void test_metadata()
{
- constexpr auto m = entity_metadata<TestAccessors>();
+ constexpr auto m = entity_metadata<TestAccessors, inspect_intent_t>();
static_assert(sizeof m == 1);
fm_assert(m.class_name == name_of<TestAccessors>);
fm_assert(m.class_name.contains("TestAccessors"_s));
@@ -160,7 +160,7 @@ void test_type_name()
constexpr auto foo = entity::type<int>::field{"foo"_s, &TestAccessors::foo, nullptr};
static_assert(foo.writer == nullptr);
static_assert(!foo.can_write);
- static_assert(std::get<0>(entity_accessors<TestAccessors>::accessors()).can_write);
+ static_assert(std::get<0>(entity_accessors<TestAccessors, inspect_intent_t>::accessors()).can_write);
}
void test_predicate()
@@ -185,7 +185,7 @@ void test_predicate()
constexpr bool test_names()
{
- constexpr auto m = entity_metadata<TestAccessors>();
+ constexpr auto m = entity_metadata<TestAccessors, inspect_intent_t>();
auto [foo1, bar1, baz1] = m.accessors;
auto [foo2, bar2, baz2] = m.erased_accessors;