#pragma once #include #include #include #include #include #include #include class test_produce_xlsx : public CxxTest::TestSuite { public: bool workbook_matches_file(xlnt::workbook &wb, const xlnt::path &file) { std::vector buffer; wb.save(buffer); wb.save(xlnt::path("a.xlsx")); xlnt::zip_file wb_archive(buffer); xlnt::zip_file file_archive(file); return xml_helper::archives_match(wb_archive, file_archive); } void test_empty_excel() { xlnt::workbook wb = xlnt::workbook::empty_excel(); TS_ASSERT(workbook_matches_file(wb, path_helper::get_data_directory("xlsx/8_default-excel.xlsx"))); } };