diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-01-14 01:46:50 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-01-16 15:43:10 +0000 |
commit | 574d767d54edbca6d4a01e6ab876a26f7478ff5f (patch) | |
tree | 0ec5021f1fe59a3169bf8dc69a35278154456689 /test/test-collection.cpp | |
parent | Progressive constructors for RayTracer (diff) | |
download | ilt-574d767d54edbca6d4a01e6ab876a26f7478ff5f.tar.bz2 ilt-574d767d54edbca6d4a01e6ab876a26f7478ff5f.tar.xz ilt-574d767d54edbca6d4a01e6ab876a26f7478ff5f.zip |
Process UI layers in reverse, so it's stack like
Diffstat (limited to 'test/test-collection.cpp')
-rw-r--r-- | test/test-collection.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test-collection.cpp b/test/test-collection.cpp index 6e54da3..f31b3a6 100644 --- a/test/test-collection.cpp +++ b/test/test-collection.cpp @@ -35,6 +35,7 @@ public: using TestCollection = Collection<Base>; BOOST_TEST_DONT_PRINT_LOG_VALUE(Collection<Base>::Objects::const_iterator) +BOOST_TEST_DONT_PRINT_LOG_VALUE(Collection<Base>::Objects::const_reverse_iterator) BOOST_FIXTURE_TEST_SUITE(tc, TestCollection) @@ -54,6 +55,15 @@ BOOST_AUTO_TEST_CASE(a_base) BOOST_CHECK_EQUAL(i, end()); } +BOOST_AUTO_TEST_CASE(a_rbase) +{ + auto b = create<Base>(); + BOOST_REQUIRE(rapply(&Base::add)); + BOOST_CHECK_EQUAL(b->total, 1); + const auto i = rapplyOne(&Base::add); + BOOST_CHECK_EQUAL(i, rend()); +} + BOOST_AUTO_TEST_CASE(a_sub) { auto s = create<Sub>(); |