summaryrefslogtreecommitdiff
path: root/test/test-glContainer.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-05-01 16:21:30 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-05-01 16:21:30 +0100
commit90214f9707f603741b84798c3672b5b13244a817 (patch)
tree80fd2aedaafbedb979f5a991ac93e7a4e2838489 /test/test-glContainer.cpp
parentglContainer should at least double in capacity as required (diff)
downloadilt-90214f9707f603741b84798c3672b5b13244a817.tar.bz2
ilt-90214f9707f603741b84798c3672b5b13244a817.tar.xz
ilt-90214f9707f603741b84798c3672b5b13244a817.zip
Add missing test over iterator comparison
Diffstat (limited to 'test/test-glContainer.cpp')
-rw-r--r--test/test-glContainer.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test-glContainer.cpp b/test/test-glContainer.cpp
index 09d21d1..33ec992 100644
--- a/test/test-glContainer.cpp
+++ b/test/test-glContainer.cpp
@@ -264,6 +264,17 @@ BOOST_AUTO_TEST_CASE(stl)
}
}
+BOOST_AUTO_TEST_CASE(iter_compare)
+{
+ BOOST_CHECK_EQUAL(begin(), end());
+ BOOST_CHECK_EQUAL(rbegin(), rend());
+ emplace_back();
+ BOOST_CHECK_LT(begin(), end());
+ BOOST_CHECK_LT(rbegin(), rend());
+ BOOST_CHECK_LT(cbegin(), cend());
+ BOOST_CHECK_LT(crbegin(), crend());
+}
+
BOOST_AUTO_TEST_SUITE_END();
struct C {
@@ -326,6 +337,7 @@ BOOST_AUTO_TEST_CASE(basic)
BOOST_CHECK_EQUAL(size(), 1);
BOOST_CHECK_EQUAL(capacity(), 1);
}
+
BOOST_AUTO_TEST_CASE(insert_remove_test)
{
BOOST_CHECK_NO_THROW(emplace_back(1, 2.f));