From 2f50b70891986bbb434fd211baba472025f92e53 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 13 Nov 2022 18:57:05 +0100 Subject: a --- test/entity.cpp | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/test/entity.cpp b/test/entity.cpp index 618fb4aa..ae50853c 100644 --- a/test/entity.cpp +++ b/test/entity.cpp @@ -12,9 +12,9 @@ void test_app::test_entity() int foo = 111; int bar() const { return _bar; } void set_bar(int value) { _bar = value; } - int _baz = 222; + int _baz = 333; private: - int _bar = 333; + int _bar = 222; }; using Entity = entity; @@ -25,13 +25,23 @@ void test_app::test_entity() constexpr const auto m_baz = Entity::Field::make{ "baz"_s, r_baz, w_baz }; auto x = Test{}; - fm_assert(m_foo.read(x) == 111); - fm_assert(m_bar.read(x) == 222); - fm_assert(m_baz.read(x) == 333); - m_foo.write(x, 1111); - m_bar.write(x, 2222); - m_baz.write(x, 3333); + { + auto a = m_foo.read(x); + auto b = m_bar.read(x); + auto c = m_baz.read(x); + fm_assert(a == 111 && b == 222 && c == 333); + } + + { + m_foo.write(x, 1111); + m_bar.write(x, 2222); + m_baz.write(x, 3333); + auto a = m_foo.read(x); + auto b = m_bar.read(x); + auto c = m_baz.read(x); + fm_assert(a == 1111 && b == 2222 && c == 3333); + } } } // namespace floormat -- cgit v1.2.3