squeeze in some const_range_iterator coverage

This commit is contained in:
Thomas Fussell 2016-07-21 19:44:00 -04:00
parent 3fe69dd922
commit 3dda90fa8d

View File

@ -757,15 +757,19 @@ public:
const auto first_cell = *first_row.rbegin(); const auto first_cell = *first_row.rbegin();
TS_ASSERT_EQUALS(first_cell.get_value<std::string>(), "C2"); TS_ASSERT_EQUALS(first_cell.get_value<std::string>(), "C2");
const auto last_row = *(--rows.rend()); auto row_iter = rows.rend();
const auto last_cell = *(--last_row.rend()); row_iter--;
const auto last_row = *row_iter;
auto cell_iter = last_row.rend();
cell_iter--;
const auto last_cell = *cell_iter;
TS_ASSERT_EQUALS(last_cell.get_value<std::string>(), "A1"); TS_ASSERT_EQUALS(last_cell.get_value<std::string>(), "A1");
for (auto ws_iter = rows.rbegin(); ws_iter != rows.rend(); ++ws_iter) for (auto ws_iter = rows.rbegin(); ws_iter != rows.rend(); ws_iter++)
{ {
const auto row = *ws_iter; const auto row = *ws_iter;
for (auto row_iter = row.rbegin(); row_iter != row.rend(); ++row_iter) for (auto row_iter = row.rbegin(); row_iter != row.rend(); row_iter++)
{ {
const auto cell = *row_iter; const auto cell = *row_iter;
TS_ASSERT_EQUALS(cell.get_value<std::string>(), cell.get_reference().to_string()); TS_ASSERT_EQUALS(cell.get_value<std::string>(), cell.get_reference().to_string());