Add tests, fix compile error (missing include)

This commit is contained in:
Crzyrndm 2018-07-29 14:27:49 +12:00
parent 9aff73747d
commit 4124dd78e0
3 changed files with 8 additions and 3 deletions

View File

@ -30,6 +30,7 @@
#include <xlnt/xlnt_config.hpp> #include <xlnt/xlnt_config.hpp>
#include <xlnt/cell/cell_reference.hpp> #include <xlnt/cell/cell_reference.hpp>
#include <xlnt/worksheet/range_reference.hpp> #include <xlnt/worksheet/range_reference.hpp>
#include <xlnt/worksheet/major_order.hpp>
#include <xlnt/worksheet/worksheet.hpp> #include <xlnt/worksheet/worksheet.hpp>
namespace xlnt { namespace xlnt {

View File

@ -214,6 +214,8 @@ public:
iter = temp--; iter = temp--;
xlnt_assert_equals((*iter).title(), "Sheet2"); xlnt_assert_equals((*iter).title(), "Sheet2");
xlnt_assert_equals((*temp).title(), "Sheet1"); xlnt_assert_equals((*temp).title(), "Sheet1");
xlnt_assert_equals(xlnt::worksheet_iterator{}, xlnt::worksheet_iterator{});
} }
void test_const_iter() void test_const_iter()

View File

@ -27,10 +27,9 @@
#include <xlnt/cell/hyperlink.hpp> #include <xlnt/cell/hyperlink.hpp>
#include <xlnt/workbook/workbook.hpp> #include <xlnt/workbook/workbook.hpp>
#include <xlnt/worksheet/column_properties.hpp> #include <xlnt/worksheet/column_properties.hpp>
#include <xlnt/worksheet/row_properties.hpp>
#include <xlnt/worksheet/range.hpp>
#include <xlnt/worksheet/worksheet.hpp>
#include <xlnt/worksheet/header_footer.hpp> #include <xlnt/worksheet/header_footer.hpp>
#include <xlnt/worksheet/range.hpp>
#include <xlnt/worksheet/row_properties.hpp>
#include <xlnt/worksheet/worksheet.hpp> #include <xlnt/worksheet/worksheet.hpp>
#include <helpers/test_suite.hpp> #include <helpers/test_suite.hpp>
@ -1052,6 +1051,9 @@ public:
const_range_iter++; const_range_iter++;
const_range_iter--; const_range_iter--;
xlnt_assert_equals(const_range_iter, const_range.begin()); xlnt_assert_equals(const_range_iter, const_range.begin());
xlnt_assert_equals(xlnt::cell_iterator{}, xlnt::cell_iterator{});
xlnt_assert_equals(xlnt::range_iterator{}, xlnt::range_iterator{});
} }
void test_range_reference() void test_range_reference()