From 2e035bba62ac7f939a5cd916106cf5a4838ec98c Mon Sep 17 00:00:00 2001 From: Thomas Fussell Date: Sat, 9 Jul 2016 10:20:08 -0400 Subject: [PATCH] cover const_worksheet_iterator --- source/workbook/tests/test_workbook.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/workbook/tests/test_workbook.hpp b/source/workbook/tests/test_workbook.hpp index 1057a6ea..0da32e71 100644 --- a/source/workbook/tests/test_workbook.hpp +++ b/source/workbook/tests/test_workbook.hpp @@ -223,6 +223,15 @@ public: TS_ASSERT_EQUALS((*(iter++)).get_title(), "Sheet1"); TS_ASSERT_EQUALS((*(iter++)).get_title(), "Sheet2"); TS_ASSERT_EQUALS(iter, wb.end()); + + const auto wb_const = wb; + + auto const_iter = wb_const.begin(); + + TS_ASSERT_EQUALS((*(const_iter++)).get_title(), "Sheet"); + TS_ASSERT_EQUALS((*(const_iter++)).get_title(), "Sheet1"); + TS_ASSERT_EQUALS((*(const_iter++)).get_title(), "Sheet2"); + TS_ASSERT_EQUALS(const_iter, wb_const.end()); } void test_copy_iterator()