mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
tests compile now, but still some functions undefined
This commit is contained in:
parent
55246437ea
commit
411a735098
|
@ -43,49 +43,62 @@ public:
|
||||||
letters.push_back(xlnt::cell::get_column_letter(i + 1));
|
letters.push_back(xlnt::cell::get_column_letter(i + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<xlnt::cell> expected_rows;
|
std::vector<std::vector<std::string>> expected_rows;
|
||||||
|
|
||||||
for(int row = 0; row < 20; row++)
|
for(int row = 0; row < 20; row++)
|
||||||
{
|
{
|
||||||
expected_rows.append(["%s%d" % (letter, row + 1) for letter in letters]);
|
expected_rows.push_back(std::vector<std::string>());
|
||||||
for(auto row in range(20))
|
for(auto letter : letters)
|
||||||
{
|
{
|
||||||
expected_rows.append([(row + 1) for letter in letters]);
|
expected_rows.back().push_back(letter + std::to_string(row + 1));
|
||||||
for(auto row in range(10))
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int row = 0; row < 20; row++)
|
||||||
{
|
{
|
||||||
expected_rows.append([datetime(2010, ((x % 12) + 1), row + 1) for x in range(len(letters))]);
|
expected_rows.push_back(std::vector<std::string>());
|
||||||
for(auto row in range(20))
|
for(auto letter : letters)
|
||||||
{
|
{
|
||||||
expected_rows.append(["=%s%d" % (letter, row + 1) for letter in letters]);
|
expected_rows.back().push_back(letter + std::to_string(row + 1));
|
||||||
for(auto row in expected_rows)
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int row = 0; row < 10; row++)
|
||||||
|
{
|
||||||
|
expected_rows.push_back(std::vector<std::string>());
|
||||||
|
for(auto letter : letters)
|
||||||
|
{
|
||||||
|
expected_rows.back().push_back(letter + std::to_string(row + 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(auto row : expected_rows)
|
||||||
{
|
{
|
||||||
ws.append(row);
|
ws.append(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
wb.save(test_filename);
|
wb.save(test_filename);
|
||||||
wb2 = load_workbook(test_filename, True);
|
|
||||||
}
|
|
||||||
|
|
||||||
ws = wb2.worksheets[0];
|
xlnt::workbook wb2;
|
||||||
}
|
wb2.load(test_filename);
|
||||||
}
|
ws = wb2[0];
|
||||||
}
|
|
||||||
|
|
||||||
|
auto expected_row = expected_rows.begin();
|
||||||
for(auto ex_row, ws_row : zip(expected_rows[:-20], ws.iter_rows()))
|
for(auto row : ws.rows())
|
||||||
{
|
{
|
||||||
for(auto ex_cell, ws_cell : zip(ex_row, ws_row))
|
auto expected_cell = expected_row->begin();
|
||||||
|
for(auto cell : row)
|
||||||
{
|
{
|
||||||
TS_ASSERT_EQUALS(ex_cell, ws_cell.internal_value);
|
TS_ASSERT_EQUALS(cell, *expected_cell);
|
||||||
|
expected_cell++;
|
||||||
os.remove(test_filename);
|
|
||||||
}
|
}
|
||||||
|
expected_row++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_table_builder()
|
void test_table_builder()
|
||||||
{
|
{
|
||||||
StringTableBuilder sb;
|
xlnt::string_table_builder sb;
|
||||||
|
|
||||||
std::unordered_map<std::string, int> result = {{"a", 0}, {"b", 1}, {"c", 2}, {"d", 3}};
|
std::unordered_map<std::string, int> result = {{"a", 0}, {"b", 1}, {"c", 2}, {"d", 3}};
|
||||||
|
|
||||||
|
@ -94,19 +107,14 @@ public:
|
||||||
for(int i = 0; i < 5; i++)
|
for(int i = 0; i < 5; i++)
|
||||||
{
|
{
|
||||||
sb.add(pair.first);
|
sb.add(pair.first);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
auto table = sb.get_table();
|
auto table = sb.get_table();
|
||||||
|
|
||||||
try
|
for(auto pair : result)
|
||||||
{
|
{
|
||||||
result_items = result.items();
|
TS_ASSERT_EQUALS(pair.second, table[pair.first]);
|
||||||
}
|
|
||||||
|
|
||||||
for key, idx in result_items
|
|
||||||
{
|
|
||||||
TS_ASSERT_EQUALS(idx, table[key])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,12 +135,9 @@ public:
|
||||||
|
|
||||||
void test_create_temp_file()
|
void test_create_temp_file()
|
||||||
{
|
{
|
||||||
f = dump_worksheet.create_temporary_file();
|
auto f = xlnt::writer::create_temporary_file();
|
||||||
|
TS_ASSERT(xlnt::file::exists(f));
|
||||||
if(!osp.isfile(f))
|
xlnt::writer::delete_temporary_file(f);
|
||||||
{
|
|
||||||
raise Exception("The file %s does not exist" % f)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_dump_twice()
|
void test_dump_twice()
|
||||||
|
|
|
@ -15,20 +15,23 @@ public:
|
||||||
|
|
||||||
void test_get_dimensions()
|
void test_get_dimensions()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
auto expected = {"A1:G5", "D1:K30", "D2:D2", "A1:C1"};
|
auto expected = {"A1:G5", "D1:K30", "D2:D2", "A1:C1"};
|
||||||
|
|
||||||
wb = _open_wb();
|
std::string workbook_name = DATADIR + "/genuine/empty.xlsx";
|
||||||
|
xlnt::workbook wb;
|
||||||
|
wb.load(workbook_name);
|
||||||
|
|
||||||
for(i, sheetn : enumerate(wb.get_sheet_names()))
|
for(i, sheetn : enumerate(wb.get_sheet_names()))
|
||||||
{
|
{
|
||||||
ws = wb.get_sheet_by_name(name = sheetn);
|
ws = wb.get_sheet_by_name(name = sheetn);
|
||||||
TS_ASSERT_EQUALS(ws._dimensions, expected[i]);
|
TS_ASSERT_EQUALS(ws._dimensions, expected[i]);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_fast_integrated()
|
void test_read_fast_integrated()
|
||||||
{
|
{
|
||||||
std::string sheet_name = "Sheet1 - Text";
|
/*std::string sheet_name = "Sheet1 - Text";
|
||||||
|
|
||||||
std::vector<std::vector<char *>> expected = {{"This is cell A1 in Sheet 1", nullptr, nullptr, nullptr, nullptr, nullptr, nullptr},
|
std::vector<std::vector<char *>> expected = {{"This is cell A1 in Sheet 1", nullptr, nullptr, nullptr, nullptr, nullptr, nullptr},
|
||||||
{nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr},
|
{nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr},
|
||||||
|
@ -43,30 +46,30 @@ public:
|
||||||
{
|
{
|
||||||
row_values = [x.internal_value for x in row];
|
row_values = [x.internal_value for x in row];
|
||||||
TS_ASSERT_EQUALS(row_values, expected_row);
|
TS_ASSERT_EQUALS(row_values, expected_row);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_get_boundaries_range()
|
void test_get_boundaries_range()
|
||||||
{
|
{
|
||||||
TS_ASSERT_EQUALS(get_range_boundaries("C1:C4"), (3, 1, 3, 4));
|
//TS_ASSERT_EQUALS(get_range_boundaries("C1:C4"), (3, 1, 3, 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_get_boundaries_one()
|
void test_get_boundaries_one()
|
||||||
{
|
{
|
||||||
TS_ASSERT_EQUALS(get_range_boundaries("C1"), (3, 1, 4, 1));
|
//TS_ASSERT_EQUALS(get_range_boundaries("C1"), (3, 1, 4, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_single_cell_range()
|
void test_read_single_cell_range()
|
||||||
{
|
{
|
||||||
wb = load_workbook(filename = workbook_name, use_iterators = True);
|
/*wb = load_workbook(filename = workbook_name, use_iterators = True);
|
||||||
ws = wb.get_sheet_by_name(name = sheet_name);
|
ws = wb.get_sheet_by_name(name = sheet_name);
|
||||||
|
|
||||||
TS_ASSERT_EQUALS("This is cell A1 in Sheet 1", list(ws.iter_rows("A1"))[0][0].internal_value);
|
TS_ASSERT_EQUALS("This is cell A1 in Sheet 1", list(ws.iter_rows("A1"))[0][0].internal_value);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_fast_integrated2()
|
void test_read_fast_integrated2()
|
||||||
{
|
{
|
||||||
sheet_name = "Sheet2 - Numbers";
|
/*sheet_name = "Sheet2 - Numbers";
|
||||||
|
|
||||||
expected = [[x + 1] for x in range(30)];
|
expected = [[x + 1] for x in range(30)];
|
||||||
|
|
||||||
|
@ -79,17 +82,17 @@ public:
|
||||||
{
|
{
|
||||||
row_values = [x.internal_value for x in row];
|
row_values = [x.internal_value for x in row];
|
||||||
TS_ASSERT_EQUALS(row_values, expected_row);
|
TS_ASSERT_EQUALS(row_values, expected_row);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_single_cell_date()
|
void test_read_single_cell_date()
|
||||||
{
|
{
|
||||||
sheet_name = "Sheet4 - Dates";
|
//sheet_name = "Sheet4 - Dates";
|
||||||
|
|
||||||
wb = load_workbook(filename = workbook_name, use_iterators = True);
|
//wb = load_workbook(filename = workbook_name, use_iterators = True);
|
||||||
ws = wb.get_sheet_by_name(name = sheet_name);
|
//ws = wb.get_sheet_by_name(name = sheet_name);
|
||||||
|
|
||||||
TS_ASSERT_EQUALS(datetime.datetime(1973, 5, 20), list(ws.iter_rows("A1"))[0][0].internal_value);
|
//TS_ASSERT_EQUALS(datetime.datetime(1973, 5, 20), list(ws.iter_rows("A1"))[0][0].internal_value);
|
||||||
TS_ASSERT_EQUALS(datetime.datetime(1973, 5, 20, 9, 15, 2), list(ws.iter_rows("C1"))[0][0].internal_value);
|
//TS_ASSERT_EQUALS(datetime.datetime(1973, 5, 20, 9, 15, 2), list(ws.iter_rows("C1"))[0][0].internal_value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,22 +13,30 @@ public:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool equals_file_content(const std::string &file1, const std::string &file2)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void test_write_content_types()
|
void test_write_content_types()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
xlnt::workbook wb;
|
||||||
wb.create_sheet();
|
wb.create_sheet();
|
||||||
wb.create_sheet();
|
wb.create_sheet();
|
||||||
auto content = xlnt::workbook::write_content_types(wb);
|
auto content = xlnt::writer::write_content_types(wb);
|
||||||
std::string reference_file = DATADIR + "/writer/expected/[Content_Types].xml";
|
std::string reference_file = DATADIR + "/writer/expected/[Content_Types].xml";
|
||||||
assert_equals_file_content(reference_file, content);
|
TS_ASSERT(equals_file_content(reference_file, content));
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_write_root_rels()
|
void test_write_root_rels()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
xlnt::workbook wb;
|
||||||
wb.create_sheet();
|
wb.create_sheet();
|
||||||
auto content = xlnt::workbook::write_root_rels(wb);
|
auto content = xlnt::writer::write_root_rels(wb);
|
||||||
std::string reference_file = DATADIR + "/writer/expected/.rels";
|
std::string reference_file = DATADIR + "/writer/expected/.rels";
|
||||||
assert_equals_file_content(reference_file, content);
|
TS_ASSERT(equals_file_content(reference_file, content));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
const std::string DATADIR = "../../source/tests";
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,153 +13,153 @@ public:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void setup_class(cls)
|
void setup_class(int cls)
|
||||||
{
|
{
|
||||||
cls.workbook = Workbook()
|
//cls.workbook = Workbook()
|
||||||
cls.worksheet = Worksheet(cls.workbook, "Test")
|
// cls.worksheet = Worksheet(cls.workbook, "Test")
|
||||||
cls.sd = SharedDate()
|
// cls.sd = SharedDate()
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_convert_date_to_julian()
|
void test_convert_date_to_julian()
|
||||||
{
|
{
|
||||||
TS_ASSERT_EQUALS(40167, sd.to_julian(2009, 12, 20))
|
//TS_ASSERT_EQUALS(40167, sd.to_julian(2009, 12, 20))
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_convert_date_from_julian()
|
void test_convert_date_from_julian()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_date_equal(julian, datetime)
|
void test_date_equal(int julian, int datetime)
|
||||||
{
|
{
|
||||||
TS_ASSERT_EQUALS(sd.from_julian(julian), datetime);
|
//TS_ASSERT_EQUALS(sd.from_julian(julian), datetime);
|
||||||
|
|
||||||
date_pairs = (
|
//date_pairs = (
|
||||||
(40167, datetime(2009, 12, 20)),
|
// (40167, datetime(2009, 12, 20)),
|
||||||
(21980, datetime(1960, 3, 5)),
|
// (21980, datetime(1960, 3, 5)),
|
||||||
);
|
// );
|
||||||
|
|
||||||
for count, dt in date_pairs
|
//for count, dt in date_pairs
|
||||||
{
|
//{
|
||||||
yield test_date_equal, count, dt;
|
// yield test_date_equal, count, dt;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_convert_datetime_to_julian()
|
void test_convert_datetime_to_julian()
|
||||||
{
|
{
|
||||||
TS_ASSERT_EQUALS(40167, sd.datetime_to_julian(datetime(2009, 12, 20)))
|
//TS_ASSERT_EQUALS(40167, sd.datetime_to_julian(datetime(2009, 12, 20)))
|
||||||
TS_ASSERT_EQUALS(40196.5939815, sd.datetime_to_julian(datetime(2010, 1, 18, 14, 15, 20, 1600)))
|
// TS_ASSERT_EQUALS(40196.5939815, sd.datetime_to_julian(datetime(2010, 1, 18, 14, 15, 20, 1600)))
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_insert_float()
|
void test_insert_float()
|
||||||
{
|
{
|
||||||
worksheet.cell("A1").value = 3.14
|
//worksheet.cell("A1").value = 3.14
|
||||||
TS_ASSERT_EQUALS(Cell.TYPE_NUMERIC, worksheet.cell("A1")._data_type)
|
// TS_ASSERT_EQUALS(Cell.TYPE_NUMERIC, worksheet.cell("A1")._data_type)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_insert_percentage()
|
void test_insert_percentage()
|
||||||
{
|
{
|
||||||
worksheet.cell("A1").value = "3.14%"
|
//worksheet.cell("A1").value = "3.14%"
|
||||||
TS_ASSERT_EQUALS(Cell.TYPE_NUMERIC, worksheet.cell("A1")._data_type)
|
// TS_ASSERT_EQUALS(Cell.TYPE_NUMERIC, worksheet.cell("A1")._data_type)
|
||||||
assert_almost_equal(0.0314, worksheet.cell("A1").value)
|
// assert_almost_equal(0.0314, worksheet.cell("A1").value)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_insert_datetime()
|
void test_insert_datetime()
|
||||||
{
|
{
|
||||||
worksheet.cell("A1").value = date.today()
|
//worksheet.cell("A1").value = date.today()
|
||||||
TS_ASSERT_EQUALS(Cell.TYPE_NUMERIC, worksheet.cell("A1")._data_type)
|
// TS_ASSERT_EQUALS(Cell.TYPE_NUMERIC, worksheet.cell("A1")._data_type)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_insert_date()
|
void test_insert_date()
|
||||||
{
|
{
|
||||||
worksheet.cell("A1").value = datetime.now()
|
//worksheet.cell("A1").value = datetime.now()
|
||||||
TS_ASSERT_EQUALS(Cell.TYPE_NUMERIC, worksheet.cell("A1")._data_type)
|
// TS_ASSERT_EQUALS(Cell.TYPE_NUMERIC, worksheet.cell("A1")._data_type)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_internal_date()
|
void test_internal_date()
|
||||||
{
|
{
|
||||||
dt = datetime(2010, 7, 13, 6, 37, 41)
|
//dt = datetime(2010, 7, 13, 6, 37, 41)
|
||||||
worksheet.cell("A3").value = dt
|
// worksheet.cell("A3").value = dt
|
||||||
TS_ASSERT_EQUALS(40372.27616898148, worksheet.cell("A3")._value)
|
// TS_ASSERT_EQUALS(40372.27616898148, worksheet.cell("A3")._value)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_datetime_interpretation()
|
void test_datetime_interpretation()
|
||||||
{
|
{
|
||||||
dt = datetime(2010, 7, 13, 6, 37, 41)
|
//dt = datetime(2010, 7, 13, 6, 37, 41)
|
||||||
worksheet.cell("A3").value = dt
|
// worksheet.cell("A3").value = dt
|
||||||
TS_ASSERT_EQUALS(dt, worksheet.cell("A3").value)
|
// TS_ASSERT_EQUALS(dt, worksheet.cell("A3").value)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_date_interpretation()
|
void test_date_interpretation()
|
||||||
{
|
{
|
||||||
dt = date(2010, 7, 13)
|
//dt = date(2010, 7, 13)
|
||||||
worksheet.cell("A3").value = dt
|
// worksheet.cell("A3").value = dt
|
||||||
TS_ASSERT_EQUALS(datetime(2010, 7, 13, 0, 0), worksheet.cell("A3").value)
|
// TS_ASSERT_EQUALS(datetime(2010, 7, 13, 0, 0), worksheet.cell("A3").value)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_number_format_style()
|
void test_number_format_style()
|
||||||
{
|
{
|
||||||
worksheet.cell("A1").value = "12.6%"
|
//worksheet.cell("A1").value = "12.6%"
|
||||||
TS_ASSERT_EQUALS(NumberFormat.FORMAT_PERCENTAGE, \
|
// TS_ASSERT_EQUALS(NumberFormat.FORMAT_PERCENTAGE, \
|
||||||
worksheet.cell("A1").style.number_format.format_code)
|
// worksheet.cell("A1").style.number_format.format_code)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_date_format_on_non_date()
|
void test_date_format_on_non_date()
|
||||||
{
|
{
|
||||||
cell = worksheet.cell("A1");
|
//cell = worksheet.cell("A1");
|
||||||
}
|
}
|
||||||
|
|
||||||
void check_date_pair(count, date_string)
|
void check_date_pair(int count, const std::string &date_string)
|
||||||
{
|
{
|
||||||
cell.value = strptime(date_string, "%Y-%m-%d");
|
//cell.value = strptime(date_string, "%Y-%m-%d");
|
||||||
TS_ASSERT_EQUALS(count, cell._value);
|
//TS_ASSERT_EQUALS(count, cell._value);
|
||||||
|
|
||||||
date_pairs = (
|
//date_pairs = (
|
||||||
(15, "1900-01-15"),
|
// (15, "1900-01-15"),
|
||||||
(59, "1900-02-28"),
|
// (59, "1900-02-28"),
|
||||||
(61, "1900-03-01"),
|
// (61, "1900-03-01"),
|
||||||
(367, "1901-01-01"),
|
// (367, "1901-01-01"),
|
||||||
(2958465, "9999-12-31"), );
|
// (2958465, "9999-12-31"), );
|
||||||
for count, date_string in date_pairs
|
//for count, date_string in date_pairs
|
||||||
{
|
//{
|
||||||
yield check_date_pair, count, date_string;
|
// yield check_date_pair, count, date_string;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_1900_leap_year()
|
void test_1900_leap_year()
|
||||||
{
|
{
|
||||||
assert_raises(ValueError, sd.from_julian, 60)
|
//assert_raises(ValueError, sd.from_julian, 60)
|
||||||
assert_raises(ValueError, sd.to_julian, 1900, 2, 29)
|
// assert_raises(ValueError, sd.to_julian, 1900, 2, 29)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_bad_date()
|
void test_bad_date()
|
||||||
{
|
{
|
||||||
void check_bad_date(year, month, day)
|
//void check_bad_date(year, month, day)
|
||||||
{
|
//{
|
||||||
assert_raises(ValueError, sd.to_julian, year, month, day)
|
// assert_raises(ValueError, sd.to_julian, year, month, day)
|
||||||
}
|
//}
|
||||||
|
|
||||||
bad_dates = ((1776, 7, 4), (1899, 12, 31), )
|
//bad_dates = ((1776, 7, 4), (1899, 12, 31), )
|
||||||
for year, month, day in bad_dates
|
// for year, month, day in bad_dates
|
||||||
{
|
// {
|
||||||
yield check_bad_date, year, month, day
|
// yield check_bad_date, year, month, day
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_bad_julian_date()
|
void test_bad_julian_date()
|
||||||
{
|
{
|
||||||
assert_raises(ValueError, sd.from_julian, -1)
|
//assert_raises(ValueError, sd.from_julian, -1)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_mac_date()
|
void test_mac_date()
|
||||||
{
|
{
|
||||||
sd.excel_base_date = CALENDAR_MAC_1904
|
// sd.excel_base_date = CALENDAR_MAC_1904
|
||||||
|
|
||||||
datetuple = (2011, 10, 31)
|
// datetuple = (2011, 10, 31)
|
||||||
|
|
||||||
dt = date(datetuple[0], datetuple[1], datetuple[2])
|
// dt = date(datetuple[0], datetuple[1], datetuple[2])
|
||||||
julian = sd.to_julian(datetuple[0], datetuple[1], datetuple[2])
|
// julian = sd.to_julian(datetuple[0], datetuple[1], datetuple[2])
|
||||||
reverse = sd.from_julian(julian).date()
|
// reverse = sd.from_julian(julian).date()
|
||||||
TS_ASSERT_EQUALS(dt, reverse)
|
// TS_ASSERT_EQUALS(dt, reverse)
|
||||||
sd.excel_base_date = CALENDAR_WINDOWS_1900
|
// sd.excel_base_date = CALENDAR_WINDOWS_1900
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,13 +15,13 @@ public:
|
||||||
|
|
||||||
void test_hasher()
|
void test_hasher()
|
||||||
{
|
{
|
||||||
TS_ASSERT_EQUALS("CBEB", hash_password("test"));
|
TS_ASSERT_EQUALS("CBEB", xlnt::sheet_protection::hash_password("test"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_sheet_protection()
|
void test_sheet_protection()
|
||||||
{
|
{
|
||||||
protection = SheetProtection();
|
xlnt::sheet_protection protection;
|
||||||
protection.password = "test";
|
protection.set_password("test");
|
||||||
TS_ASSERT_EQUALS("CBEB", protection.password);
|
TS_ASSERT_EQUALS("CBEB", protection.get_hashed_password());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,97 +20,85 @@ public:
|
||||||
|
|
||||||
class TestReaderProps
|
class TestReaderProps
|
||||||
{
|
{
|
||||||
void setup_class(cls)
|
void setup_class(int cls)
|
||||||
{
|
{
|
||||||
cls.genuine_filename = os.path.join(DATADIR, "genuine", "empty.xlsx");
|
//cls.genuine_filename = os.path.join(DATADIR, "genuine", "empty.xlsx");
|
||||||
cls.archive = ZipFile(cls.genuine_filename, "r", ZIP_DEFLATED);
|
//cls.archive = ZipFile(cls.genuine_filename, "r", ZIP_DEFLATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void teardown_class(cls)
|
void teardown_class(int cls)
|
||||||
{
|
{
|
||||||
cls.archive.close();
|
//cls.archive.close();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void test_read_properties_core()
|
void test_read_properties_core()
|
||||||
{
|
{
|
||||||
content = archive.read(ARC_CORE)
|
//content = archive.read(ARC_CORE)
|
||||||
prop = read_properties_core(content)
|
// prop = read_properties_core(content)
|
||||||
TS_ASSERT_EQUALS(prop.creator, "*.*")
|
// TS_ASSERT_EQUALS(prop.creator, "*.*")
|
||||||
eacute = chr(233)
|
// eacute = chr(233)
|
||||||
TS_ASSERT_EQUALS(prop.last_modified_by, "Aur" + eacute + "lien Camp" + eacute + "as")
|
// TS_ASSERT_EQUALS(prop.last_modified_by, "Aur" + eacute + "lien Camp" + eacute + "as")
|
||||||
TS_ASSERT_EQUALS(prop.created, datetime(2010, 4, 9, 20, 43, 12))
|
// TS_ASSERT_EQUALS(prop.created, datetime(2010, 4, 9, 20, 43, 12))
|
||||||
TS_ASSERT_EQUALS(prop.modified, datetime(2011, 2, 9, 13, 49, 32))
|
// TS_ASSERT_EQUALS(prop.modified, datetime(2011, 2, 9, 13, 49, 32))
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_sheets_titles()
|
void test_read_sheets_titles()
|
||||||
{
|
{
|
||||||
content = archive.read(ARC_WORKBOOK);
|
//content = archive.read(ARC_WORKBOOK);
|
||||||
sheet_titles = read_sheets_titles(content);
|
//sheet_titles = read_sheets_titles(content);
|
||||||
TS_ASSERT_EQUALS(sheet_titles, \
|
//TS_ASSERT_EQUALS(sheet_titles, \
|
||||||
["Sheet1 - Text", "Sheet2 - Numbers", "Sheet3 - Formulas", "Sheet4 - Dates"]);
|
// ["Sheet1 - Text", "Sheet2 - Numbers", "Sheet3 - Formulas", "Sheet4 - Dates"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Just tests that the correct date / time format is returned from LibreOffice saved version
|
// Just tests that the correct date / time format is returned from LibreOffice saved version
|
||||||
|
|
||||||
void setup_class(cls)
|
void setup_class(int cls)
|
||||||
{
|
{
|
||||||
cls.genuine_filename = os.path.join(DATADIR, "genuine", "empty_libre.xlsx")
|
//cls.genuine_filename = os.path.join(DATADIR, "genuine", "empty_libre.xlsx")
|
||||||
cls.archive = ZipFile(cls.genuine_filename, "r", ZIP_DEFLATED)
|
// cls.archive = ZipFile(cls.genuine_filename, "r", ZIP_DEFLATED)
|
||||||
}
|
}
|
||||||
|
|
||||||
void teardown_class(cls)
|
void teardown_class(int cls)
|
||||||
{
|
{
|
||||||
cls.archive.close()
|
//cls.archive.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_properties_core2()
|
void test_read_properties_core2()
|
||||||
{
|
{
|
||||||
content = archive.read(ARC_CORE)
|
// content = archive.read(ARC_CORE)
|
||||||
prop = read_properties_core(content)
|
// prop = read_properties_core(content)
|
||||||
TS_ASSERT_EQUALS(prop.excel_base_date, CALENDAR_WINDOWS_1900)
|
// TS_ASSERT_EQUALS(prop.excel_base_date, CALENDAR_WINDOWS_1900)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_sheets_titles2()
|
void test_read_sheets_titles2()
|
||||||
{
|
{
|
||||||
content = archive.read(ARC_WORKBOOK)
|
//content = archive.read(ARC_WORKBOOK)
|
||||||
sheet_titles = read_sheets_titles(content)
|
// sheet_titles = read_sheets_titles(content)
|
||||||
TS_ASSERT_EQUALS(sheet_titles, \
|
// TS_ASSERT_EQUALS(sheet_titles, \
|
||||||
["Sheet1 - Text", "Sheet2 - Numbers", "Sheet3 - Formulas", "Sheet4 - Dates"])
|
// ["Sheet1 - Text", "Sheet2 - Numbers", "Sheet3 - Formulas", "Sheet4 - Dates"])
|
||||||
}
|
|
||||||
|
|
||||||
void setup_class(cls)
|
|
||||||
{
|
|
||||||
make_tmpdir()
|
|
||||||
cls.tmp_filename = os.path.join(TMPDIR, "test.xlsx")
|
|
||||||
cls.prop = DocumentProperties()
|
|
||||||
}
|
|
||||||
|
|
||||||
void teardown_class(cls)
|
|
||||||
{
|
|
||||||
clean_tmpdir()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_write_properties_core()
|
void test_write_properties_core()
|
||||||
{
|
{
|
||||||
prop.creator = "TEST_USER"
|
//prop.creator = "TEST_USER"
|
||||||
prop.last_modified_by = "SOMEBODY"
|
// prop.last_modified_by = "SOMEBODY"
|
||||||
prop.created = datetime(2010, 4, 1, 20, 30, 00)
|
// prop.created = datetime(2010, 4, 1, 20, 30, 00)
|
||||||
prop.modified = datetime(2010, 4, 5, 14, 5, 30)
|
// prop.modified = datetime(2010, 4, 5, 14, 5, 30)
|
||||||
content = write_properties_core(prop)
|
// content = write_properties_core(prop)
|
||||||
assert_equals_file_content(
|
// assert_equals_file_content(
|
||||||
os.path.join(DATADIR, "writer", "expected", "core.xml"),
|
// os.path.join(DATADIR, "writer", "expected", "core.xml"),
|
||||||
content)
|
// content)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_write_properties_app()
|
void test_write_properties_app()
|
||||||
{
|
{
|
||||||
wb = Workbook()
|
//wb = Workbook()
|
||||||
wb.create_sheet()
|
// wb.create_sheet()
|
||||||
wb.create_sheet()
|
// wb.create_sheet()
|
||||||
content = write_properties_app(wb)
|
// content = write_properties_app(wb)
|
||||||
assert_equals_file_content(
|
// assert_equals_file_content(
|
||||||
os.path.join(DATADIR, "writer", "expected", "app.xml"),
|
// os.path.join(DATADIR, "writer", "expected", "app.xml"),
|
||||||
content)
|
// content)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,7 +15,7 @@ public:
|
||||||
|
|
||||||
void test_read_standalone_worksheet()
|
void test_read_standalone_worksheet()
|
||||||
{
|
{
|
||||||
path = os.path.join(DATADIR, "reader", "sheet2.xml")
|
/* path = os.path.join(DATADIR, "reader", "sheet2.xml")
|
||||||
ws = None
|
ws = None
|
||||||
handle = open(path)
|
handle = open(path)
|
||||||
try :
|
try :
|
||||||
|
@ -26,171 +26,171 @@ public:
|
||||||
assert isinstance(ws, Worksheet)
|
assert isinstance(ws, Worksheet)
|
||||||
TS_ASSERT_EQUALS(ws.cell("G5").value, "hello")
|
TS_ASSERT_EQUALS(ws.cell("G5").value, "hello")
|
||||||
TS_ASSERT_EQUALS(ws.cell("D30").value, 30)
|
TS_ASSERT_EQUALS(ws.cell("D30").value, 30)
|
||||||
TS_ASSERT_EQUALS(ws.cell("K9").value, 0.09)
|
TS_ASSERT_EQUALS(ws.cell("K9").value, 0.09)*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_standard_workbook()
|
void test_read_standard_workbook()
|
||||||
{
|
{
|
||||||
path = os.path.join(DATADIR, "genuine", "empty.xlsx")
|
/*path = os.path.join(DATADIR, "genuine", "empty.xlsx")
|
||||||
wb = load_workbook(path)
|
wb = load_workbook(path)
|
||||||
assert isinstance(wb, Workbook)
|
assert isinstance(wb, Workbook)*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_standard_workbook_from_fileobj()
|
void test_read_standard_workbook_from_fileobj()
|
||||||
{
|
{
|
||||||
path = os.path.join(DATADIR, "genuine", "empty.xlsx")
|
/*path = os.path.join(DATADIR, "genuine", "empty.xlsx")
|
||||||
fo = open(path, mode = "rb")
|
fo = open(path, mode = "rb")
|
||||||
wb = load_workbook(fo)
|
wb = load_workbook(fo)
|
||||||
assert isinstance(wb, Workbook)
|
assert isinstance(wb, Workbook)*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_worksheet()
|
void test_read_worksheet()
|
||||||
{
|
{
|
||||||
path = os.path.join(DATADIR, "genuine", "empty.xlsx")
|
/*path = os.path.join(DATADIR, "genuine", "empty.xlsx")
|
||||||
wb = load_workbook(path)
|
wb = load_workbook(path)
|
||||||
sheet2 = wb.get_sheet_by_name("Sheet2 - Numbers")
|
sheet2 = wb.get_sheet_by_name("Sheet2 - Numbers")
|
||||||
assert isinstance(sheet2, Worksheet)
|
assert isinstance(sheet2, Worksheet)
|
||||||
TS_ASSERT_EQUALS("This is cell G5", sheet2.cell("G5").value)
|
TS_ASSERT_EQUALS("This is cell G5", sheet2.cell("G5").value)
|
||||||
TS_ASSERT_EQUALS(18, sheet2.cell("D18").value)
|
TS_ASSERT_EQUALS(18, sheet2.cell("D18").value)*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_nostring_workbook()
|
void test_read_nostring_workbook()
|
||||||
{
|
{
|
||||||
genuine_wb = os.path.join(DATADIR, "genuine", "empty-no-string.xlsx")
|
/*genuine_wb = os.path.join(DATADIR, "genuine", "empty-no-string.xlsx")
|
||||||
wb = load_workbook(genuine_wb)
|
wb = load_workbook(genuine_wb)
|
||||||
assert isinstance(wb, Workbook)
|
assert isinstance(wb, Workbook)*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_empty_file()
|
void test_read_empty_file()
|
||||||
{
|
{
|
||||||
std::string null_file = os.path.join(DATADIR, "reader", "null_file.xlsx");
|
/*std::string null_file = os.path.join(DATADIR, "reader", "null_file.xlsx");
|
||||||
xlnt::workbook wb;
|
xlnt::workbook wb;
|
||||||
TS_ASSERT_THROWS(InvalidFile, wb.load(null_file));
|
TS_ASSERT_THROWS(InvalidFile, wb.load(null_file));*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@raises(InvalidFileException)
|
//@raises(InvalidFileException)
|
||||||
void test_read_empty_archive()
|
void test_read_empty_archive()
|
||||||
{
|
{
|
||||||
null_file = os.path.join(DATADIR, "reader", "null_archive.xlsx")
|
//null_file = os.path.join(DATADIR, "reader", "null_archive.xlsx")
|
||||||
wb = load_workbook(null_file)
|
// wb = load_workbook(null_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_dimension()
|
void test_read_dimension()
|
||||||
{
|
{
|
||||||
path = os.path.join(DATADIR, "reader", "sheet2.xml")
|
//path = os.path.join(DATADIR, "reader", "sheet2.xml")
|
||||||
|
|
||||||
dimension = None
|
// dimension = None
|
||||||
handle = open(path)
|
// handle = open(path)
|
||||||
try :
|
// try :
|
||||||
dimension = read_dimension(xml_source = handle.read())
|
// dimension = read_dimension(xml_source = handle.read())
|
||||||
finally :
|
// finally :
|
||||||
handle.close()
|
// handle.close()
|
||||||
|
|
||||||
TS_ASSERT_EQUALS(("D", 1, "K", 30), dimension)
|
// TS_ASSERT_EQUALS(("D", 1, "K", 30), dimension)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_calculate_dimension_iter()
|
void test_calculate_dimension_iter()
|
||||||
{
|
{
|
||||||
path = os.path.join(DATADIR, "genuine", "empty.xlsx")
|
//path = os.path.join(DATADIR, "genuine", "empty.xlsx")
|
||||||
wb = load_workbook(filename = path, use_iterators = True)
|
// wb = load_workbook(filename = path, use_iterators = True)
|
||||||
sheet2 = wb.get_sheet_by_name("Sheet2 - Numbers")
|
// sheet2 = wb.get_sheet_by_name("Sheet2 - Numbers")
|
||||||
dimensions = sheet2.calculate_dimension()
|
// dimensions = sheet2.calculate_dimension()
|
||||||
TS_ASSERT_EQUALS("%s%s:%s%s" % ("D", 1, "K", 30), dimensions)
|
// TS_ASSERT_EQUALS("%s%s:%s%s" % ("D", 1, "K", 30), dimensions)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_get_highest_row_iter()
|
void test_get_highest_row_iter()
|
||||||
{
|
{
|
||||||
path = os.path.join(DATADIR, "genuine", "empty.xlsx")
|
//path = os.path.join(DATADIR, "genuine", "empty.xlsx")
|
||||||
wb = load_workbook(filename = path, use_iterators = True)
|
// wb = load_workbook(filename = path, use_iterators = True)
|
||||||
sheet2 = wb.get_sheet_by_name("Sheet2 - Numbers")
|
// sheet2 = wb.get_sheet_by_name("Sheet2 - Numbers")
|
||||||
max_row = sheet2.get_highest_row()
|
// max_row = sheet2.get_highest_row()
|
||||||
TS_ASSERT_EQUALS(30, max_row)
|
// TS_ASSERT_EQUALS(30, max_row)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_workbook_with_no_properties()
|
void test_read_workbook_with_no_properties()
|
||||||
{
|
{
|
||||||
genuine_wb = os.path.join(DATADIR, "genuine", \
|
//genuine_wb = os.path.join(DATADIR, "genuine", \
|
||||||
"empty_with_no_properties.xlsx")
|
// "empty_with_no_properties.xlsx")
|
||||||
wb = load_workbook(filename = genuine_wb)
|
// wb = load_workbook(filename = genuine_wb)
|
||||||
}
|
}
|
||||||
|
|
||||||
void setup_class_with_styles(cls)
|
void setup_class_with_styles(int cls)
|
||||||
{
|
{
|
||||||
cls.genuine_wb = os.path.join(DATADIR, "genuine", \
|
//cls.genuine_wb = os.path.join(DATADIR, "genuine", \
|
||||||
"empty-with-styles.xlsx")
|
// "empty-with-styles.xlsx")
|
||||||
wb = load_workbook(cls.genuine_wb)
|
// wb = load_workbook(cls.genuine_wb)
|
||||||
cls.ws = wb.get_sheet_by_name("Sheet1")
|
// cls.ws = wb.get_sheet_by_name("Sheet1")
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_general_style()
|
void test_read_general_style()
|
||||||
{
|
{
|
||||||
TS_ASSERT_EQUALS(ws.cell("A1").style.number_format.format_code,
|
//TS_ASSERT_EQUALS(ws.cell("A1").style.number_format.format_code,
|
||||||
NumberFormat.FORMAT_GENERAL)
|
// NumberFormat.FORMAT_GENERAL)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_date_style()
|
void test_read_date_style()
|
||||||
{
|
{
|
||||||
TS_ASSERT_EQUALS(ws.cell("A2").style.number_format.format_code,
|
//TS_ASSERT_EQUALS(ws.cell("A2").style.number_format.format_code,
|
||||||
NumberFormat.FORMAT_DATE_XLSX14)
|
// NumberFormat.FORMAT_DATE_XLSX14)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_number_style()
|
void test_read_number_style()
|
||||||
{
|
{
|
||||||
TS_ASSERT_EQUALS(ws.cell("A3").style.number_format.format_code,
|
//TS_ASSERT_EQUALS(ws.cell("A3").style.number_format.format_code,
|
||||||
NumberFormat.FORMAT_NUMBER_00)
|
// NumberFormat.FORMAT_NUMBER_00)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_time_style()
|
void test_read_time_style()
|
||||||
{
|
{
|
||||||
TS_ASSERT_EQUALS(ws.cell("A4").style.number_format.format_code,
|
//TS_ASSERT_EQUALS(ws.cell("A4").style.number_format.format_code,
|
||||||
NumberFormat.FORMAT_DATE_TIME3)
|
// NumberFormat.FORMAT_DATE_TIME3)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_percentage_style()
|
void test_read_percentage_style()
|
||||||
{
|
{
|
||||||
TS_ASSERT_EQUALS(ws.cell("A5").style.number_format.format_code,
|
//TS_ASSERT_EQUALS(ws.cell("A5").style.number_format.format_code,
|
||||||
NumberFormat.FORMAT_PERCENTAGE_00)
|
// NumberFormat.FORMAT_PERCENTAGE_00)
|
||||||
}
|
}
|
||||||
|
|
||||||
void setup_class_base_date_format(cls)
|
void setup_class_base_date_format(/*cls*/)
|
||||||
{
|
{
|
||||||
mac_wb_path = os.path.join(DATADIR, "reader", "date_1904.xlsx")
|
//mac_wb_path = os.path.join(DATADIR, "reader", "date_1904.xlsx")
|
||||||
cls.mac_wb = load_workbook(mac_wb_path)
|
// cls.mac_wb = load_workbook(mac_wb_path)
|
||||||
cls.mac_ws = cls.mac_wb.get_sheet_by_name("Sheet1")
|
// cls.mac_ws = cls.mac_wb.get_sheet_by_name("Sheet1")
|
||||||
|
|
||||||
win_wb_path = os.path.join(DATADIR, "reader", "date_1900.xlsx")
|
// win_wb_path = os.path.join(DATADIR, "reader", "date_1900.xlsx")
|
||||||
cls.win_wb = load_workbook(win_wb_path)
|
// cls.win_wb = load_workbook(win_wb_path)
|
||||||
cls.win_ws = cls.win_wb.get_sheet_by_name("Sheet1")
|
// cls.win_ws = cls.win_wb.get_sheet_by_name("Sheet1")
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_win_base_date()
|
void test_read_win_base_date()
|
||||||
{
|
{
|
||||||
TS_ASSERT_EQUALS(win_wb.properties.excel_base_date, CALENDAR_WINDOWS_1900)
|
//TS_ASSERT_EQUALS(win_wb.properties.excel_base_date, CALENDAR_WINDOWS_1900)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_mac_base_date()
|
void test_read_mac_base_date()
|
||||||
{
|
{
|
||||||
TS_ASSERT_EQUALS(mac_wb.properties.excel_base_date, CALENDAR_MAC_1904)
|
//TS_ASSERT_EQUALS(mac_wb.properties.excel_base_date, CALENDAR_MAC_1904)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_date_style_mac()
|
void test_read_date_style_mac()
|
||||||
{
|
{
|
||||||
TS_ASSERT_EQUALS(mac_ws.cell("A1").style.number_format.format_code,
|
//TS_ASSERT_EQUALS(mac_ws.cell("A1").style.number_format.format_code,
|
||||||
NumberFormat.FORMAT_DATE_XLSX14)
|
// NumberFormat.FORMAT_DATE_XLSX14)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_date_style_win()
|
void test_read_date_style_win()
|
||||||
{
|
{
|
||||||
TS_ASSERT_EQUALS(win_ws.cell("A1").style.number_format.format_code,
|
//TS_ASSERT_EQUALS(win_ws.cell("A1").style.number_format.format_code,
|
||||||
NumberFormat.FORMAT_DATE_XLSX14)
|
// NumberFormat.FORMAT_DATE_XLSX14)
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_date_value()
|
void test_read_date_value()
|
||||||
{
|
{
|
||||||
datetuple = (2011, 10, 31)
|
//datetuple = (2011, 10, 31)
|
||||||
dt = datetime(datetuple[0], datetuple[1], datetuple[2])
|
// dt = datetime(datetuple[0], datetuple[1], datetuple[2])
|
||||||
TS_ASSERT_EQUALS(mac_ws.cell("A1").value, dt)
|
// TS_ASSERT_EQUALS(mac_ws.cell("A1").value, dt)
|
||||||
TS_ASSERT_EQUALS(win_ws.cell("A1").value, dt)
|
// TS_ASSERT_EQUALS(win_ws.cell("A1").value, dt)
|
||||||
TS_ASSERT_EQUALS(mac_ws.cell("A1").value, win_ws.cell("A1").value)
|
// TS_ASSERT_EQUALS(mac_ws.cell("A1").value, win_ws.cell("A1").value)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,46 +15,46 @@ public:
|
||||||
|
|
||||||
void test_create_string_table()
|
void test_create_string_table()
|
||||||
{
|
{
|
||||||
wb = Workbook()
|
/*wb = Workbook()
|
||||||
ws = wb.create_sheet()
|
ws = wb.create_sheet()
|
||||||
ws.cell("B12").value = "hello"
|
ws.cell("B12").value = "hello"
|
||||||
ws.cell("B13").value = "world"
|
ws.cell("B13").value = "world"
|
||||||
ws.cell("D28").value = "hello"
|
ws.cell("D28").value = "hello"
|
||||||
table = create_string_table(wb)
|
table = create_string_table(wb)
|
||||||
TS_ASSERT_EQUALS({"hello": 1, "world" : 0}, table)
|
TS_ASSERT_EQUALS({"hello": 1, "world" : 0}, table)*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_read_string_table()
|
void test_read_string_table()
|
||||||
{
|
{
|
||||||
handle = open(os.path.join(DATADIR, "reader", "sharedStrings.xml"))
|
/*handle = open(os.path.join(DATADIR, "reader", "sharedStrings.xml"))
|
||||||
try :
|
try :
|
||||||
content = handle.read()
|
content = handle.read()
|
||||||
string_table = read_string_table(content)
|
string_table = read_string_table(content)
|
||||||
TS_ASSERT_EQUALS({0: "This is cell A1 in Sheet 1", 1 : "This is cell G5"}, string_table)
|
TS_ASSERT_EQUALS({0: "This is cell A1 in Sheet 1", 1 : "This is cell G5"}, string_table)
|
||||||
finally :
|
finally :
|
||||||
handle.close()
|
handle.close()*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_empty_string()
|
void test_empty_string()
|
||||||
{
|
{
|
||||||
handle = open(os.path.join(DATADIR, "reader", "sharedStrings-emptystring.xml"))
|
/*handle = open(os.path.join(DATADIR, "reader", "sharedStrings-emptystring.xml"))
|
||||||
try :
|
try :
|
||||||
content = handle.read()
|
content = handle.read()
|
||||||
string_table = read_string_table(content)
|
string_table = read_string_table(content)
|
||||||
TS_ASSERT_EQUALS({0: "Testing empty cell", 1 : ""}, string_table)
|
TS_ASSERT_EQUALS({0: "Testing empty cell", 1 : ""}, string_table)
|
||||||
finally :
|
finally :
|
||||||
handle.close()
|
handle.close()*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_formatted_string_table()
|
void test_formatted_string_table()
|
||||||
{
|
{
|
||||||
handle = open(os.path.join(DATADIR, "reader", "shared-strings-rich.xml"))
|
/*handle = open(os.path.join(DATADIR, "reader", "shared-strings-rich.xml"))
|
||||||
try :
|
try :
|
||||||
content = handle.read()
|
content = handle.read()
|
||||||
string_table = read_string_table(content)
|
string_table = read_string_table(content)
|
||||||
TS_ASSERT_EQUALS({0: "Welcome", 1 : "to the best shop in town",
|
TS_ASSERT_EQUALS({0: "Welcome", 1 : "to the best shop in town",
|
||||||
2 : " let"s play "}, string_table)
|
2 : " let"s play "}, string_table)
|
||||||
finally :
|
finally :
|
||||||
handle.close()
|
handle.close()*/
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,354 +15,348 @@ public:
|
||||||
|
|
||||||
void test_get_active_sheet()
|
void test_get_active_sheet()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
/*xlnt::workbook wb;
|
||||||
auto active_sheet = wb.get_active_sheet();
|
auto active_sheet = wb.get_active_sheet();
|
||||||
TS_ASSERT_EQUALS(active_sheet, wb.worksheets[0]);
|
TS_ASSERT_EQUALS(active_sheet, wb.worksheets[0]);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_create_sheet()
|
void test_create_sheet()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
/*xlnt::workbook wb;
|
||||||
new_sheet = wb.create_sheet(0);
|
new_sheet = wb.create_sheet(0);
|
||||||
TS_ASSERT_EQUALS(new_sheet, wb.worksheets[0]);
|
TS_ASSERT_EQUALS(new_sheet, wb.worksheets[0]);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_create_sheet_with_name()
|
void test_create_sheet_with_name()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
/*xlnt::workbook wb;
|
||||||
new_sheet = wb.create_sheet(0, title = "LikeThisName");
|
new_sheet = wb.create_sheet(0, title = "LikeThisName");
|
||||||
TS_ASSERT_EQUALS(new_sheet, wb.worksheets[0]);
|
TS_ASSERT_EQUALS(new_sheet, wb.worksheets[0]);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_add_correct_sheet()
|
void test_add_correct_sheet()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
/*xlnt::workbook wb;
|
||||||
new_sheet = wb.create_sheet(0);
|
new_sheet = wb.create_sheet(0);
|
||||||
wb.add_sheet(new_sheet);
|
wb.add_sheet(new_sheet);
|
||||||
TS_ASSERT_EQUALS(new_sheet, wb.worksheets[2]);
|
TS_ASSERT_EQUALS(new_sheet, wb.worksheets[2]);*/
|
||||||
}
|
|
||||||
|
|
||||||
void test_add_incorrect_sheet()
|
|
||||||
{
|
|
||||||
xlnt::workbook wb;
|
|
||||||
wb.add_sheet("Test");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_create_sheet_readonly()
|
void test_create_sheet_readonly()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
/*xlnt::workbook wb;
|
||||||
wb._set_optimized_read();
|
wb._set_optimized_read();
|
||||||
wb.create_sheet();
|
wb.create_sheet();*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_remove_sheet()
|
void test_remove_sheet()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
/*xlnt::workbook wb;
|
||||||
new_sheet = wb.create_sheet(0);
|
new_sheet = wb.create_sheet(0);
|
||||||
wb.remove_sheet(new_sheet);
|
wb.remove_sheet(new_sheet);
|
||||||
assert new_sheet not in wb.worksheets;
|
assert new_sheet not in wb.worksheets;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_get_sheet_by_name()
|
void test_get_sheet_by_name()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
/*xlnt::workbook wb;
|
||||||
new_sheet = wb.create_sheet();
|
new_sheet = wb.create_sheet();
|
||||||
title = "my sheet";
|
title = "my sheet";
|
||||||
new_sheet.title = title;
|
new_sheet.title = title;
|
||||||
found_sheet = wb.get_sheet_by_name(title);
|
found_sheet = wb.get_sheet_by_name(title);
|
||||||
TS_ASSERT_EQUALS(new_sheet, found_sheet);
|
TS_ASSERT_EQUALS(new_sheet, found_sheet);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_get_index2()
|
void test_get_index2()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
/*xlnt::workbook wb;
|
||||||
new_sheet = wb.create_sheet(0);
|
new_sheet = wb.create_sheet(0);
|
||||||
sheet_index = wb.get_index(new_sheet);
|
sheet_index = wb.get_index(new_sheet);
|
||||||
TS_ASSERT_EQUALS(sheet_index, 0);
|
TS_ASSERT_EQUALS(sheet_index, 0);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_get_sheet_names()
|
void test_get_sheet_names()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
/*xlnt::workbook wb;
|
||||||
names = ["Sheet", "Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5"];
|
names = ["Sheet", "Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5"];
|
||||||
for(auto count : range(5))
|
for(auto count : range(5))
|
||||||
{
|
{
|
||||||
wb.create_sheet(0)
|
wb.create_sheet(0)
|
||||||
actual_names = wb.get_sheet_names()
|
actual_names = wb.get_sheet_names()
|
||||||
TS_ASSERT_EQUALS(sorted(actual_names), sorted(names))
|
TS_ASSERT_EQUALS(sorted(actual_names), sorted(names))
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_get_named_ranges2()
|
void test_get_named_ranges2()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
/*xlnt::workbook wb;
|
||||||
TS_ASSERT_EQUALS(wb.get_named_ranges(), wb._named_ranges);
|
TS_ASSERT_EQUALS(wb.get_named_ranges(), wb._named_ranges);*/
|
||||||
}
|
}
|
||||||
void test_get_active_sheet2()
|
void test_get_active_sheet2()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
/*xlnt::workbook wb;
|
||||||
active_sheet = wb.get_active_sheet();
|
active_sheet = wb.get_active_sheet();
|
||||||
TS_ASSERT_EQUALS(active_sheet, wb.worksheets[0]);
|
TS_ASSERT_EQUALS(active_sheet, wb.worksheets[0]);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_create_sheet2()
|
void test_create_sheet2()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
/*xlnt::workbook wb;
|
||||||
new_sheet = wb.create_sheet(0);
|
new_sheet = wb.create_sheet(0);
|
||||||
TS_ASSERT_EQUALS(new_sheet, wb.worksheets[0]);
|
TS_ASSERT_EQUALS(new_sheet, wb.worksheets[0]);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_create_sheet_with_name2()
|
void test_create_sheet_with_name2()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
/*xlnt::workbook wb;
|
||||||
new_sheet = wb.create_sheet(0, title = "LikeThisName");
|
new_sheet = wb.create_sheet(0, title = "LikeThisName");
|
||||||
TS_ASSERT_EQUALS(new_sheet, wb.worksheets[0]);
|
TS_ASSERT_EQUALS(new_sheet, wb.worksheets[0]);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_add_correct_sheet2()
|
void test_add_correct_sheet2()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
//xlnt::workbook wb;
|
||||||
new_sheet = wb.create_sheet(0);
|
//new_sheet = wb.create_sheet(0);
|
||||||
wb.add_sheet(new_sheet);
|
//wb.add_sheet(new_sheet);
|
||||||
TS_ASSERT_EQUALS(new_sheet, wb.worksheets[2]);
|
//TS_ASSERT_EQUALS(new_sheet, wb.worksheets[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//@raises(AssertionError)
|
//@raises(AssertionError)
|
||||||
void test_add_incorrect_sheet2()
|
void test_add_incorrect_sheet2()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
//xlnt::workbook wb;
|
||||||
TS_ASSERT_THROWS(AssertionError, wb.add_sheet("Test"))
|
//TS_ASSERT_THROWS(AssertionError, wb.add_sheet("Test"))
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_create_sheet_readonly2()
|
void test_create_sheet_readonly2()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
//xlnt::workbook wb;
|
||||||
wb._set_optimized_read();
|
//wb._set_optimized_read();
|
||||||
TS_ASSERT_THROWS(wb.create_sheet(), ReadOnlyWorkbook);
|
//TS_ASSERT_THROWS(wb.create_sheet(), ReadOnlyWorkbook);
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_remove_sheet2()
|
void test_remove_sheet2()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
//xlnt::workbook wb;
|
||||||
new_sheet = wb.create_sheet(0);
|
//new_sheet = wb.create_sheet(0);
|
||||||
wb.remove_sheet(new_sheet);
|
//wb.remove_sheet(new_sheet);
|
||||||
assert new_sheet not in wb.worksheets;
|
//assert new_sheet not in wb.worksheets;
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_get_sheet_by_name2()
|
void test_get_sheet_by_name2()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
//xlnt::workbook wb;
|
||||||
new_sheet = wb.create_sheet();
|
//new_sheet = wb.create_sheet();
|
||||||
title = "my sheet";
|
//title = "my sheet";
|
||||||
new_sheet.title = title;
|
//new_sheet.title = title;
|
||||||
found_sheet = wb.get_sheet_by_name(title);
|
//found_sheet = wb.get_sheet_by_name(title);
|
||||||
TS_ASSERT_EQUALS(new_sheet, found_sheet);
|
//TS_ASSERT_EQUALS(new_sheet, found_sheet);
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_get_index()
|
void test_get_index()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
//xlnt::workbook wb;
|
||||||
new_sheet = wb.create_sheet(0);
|
//new_sheet = wb.create_sheet(0);
|
||||||
sheet_index = wb.get_index(new_sheet);
|
//sheet_index = wb.get_index(new_sheet);
|
||||||
TS_ASSERT_EQUALS(sheet_index, 0);
|
//TS_ASSERT_EQUALS(sheet_index, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_get_sheet_names2()
|
void test_get_sheet_names2()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
//xlnt::workbook wb;
|
||||||
names = ["Sheet", "Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5"];
|
//names = ["Sheet", "Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5"];
|
||||||
for(auto count in range(5))
|
//for(auto count in range(5))
|
||||||
{
|
//{
|
||||||
wb.create_sheet(0)
|
// wb.create_sheet(0)
|
||||||
actual_names = wb.get_sheet_names()
|
// actual_names = wb.get_sheet_names()
|
||||||
TS_ASSERT_EQUALS(sorted(actual_names), sorted(names))
|
// TS_ASSERT_EQUALS(sorted(actual_names), sorted(names))
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_get_named_ranges()
|
void test_get_named_ranges()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
//xlnt::workbook wb;
|
||||||
TS_ASSERT_EQUALS(wb.get_named_ranges(), wb._named_ranges);
|
//TS_ASSERT_EQUALS(wb.get_named_ranges(), wb._named_ranges);
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_add_named_range()
|
void test_add_named_range()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
//xlnt::workbook wb;
|
||||||
new_sheet = wb.create_sheet();
|
//new_sheet = wb.create_sheet();
|
||||||
named_range = NamedRange("test_nr", [(new_sheet, "A1")]);
|
//named_range = NamedRange("test_nr", [(new_sheet, "A1")]);
|
||||||
wb.add_named_range(named_range);
|
//wb.add_named_range(named_range);
|
||||||
named_ranges_list = wb.get_named_ranges();
|
//named_ranges_list = wb.get_named_ranges();
|
||||||
assert named_range in named_ranges_list;
|
//assert named_range in named_ranges_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_get_named_range2()
|
void test_get_named_range2()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
//xlnt::workbook wb;
|
||||||
new_sheet = wb.create_sheet();
|
//new_sheet = wb.create_sheet();
|
||||||
named_range = NamedRange("test_nr", [(new_sheet, "A1")]);
|
//named_range = NamedRange("test_nr", [(new_sheet, "A1")]);
|
||||||
wb.add_named_range(named_range);
|
//wb.add_named_range(named_range);
|
||||||
found_named_range = wb.get_named_range("test_nr");
|
//found_named_range = wb.get_named_range("test_nr");
|
||||||
TS_ASSERT_EQUALS(named_range, found_named_range);
|
//TS_ASSERT_EQUALS(named_range, found_named_range);
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_remove_named_range2()
|
void test_remove_named_range2()
|
||||||
{
|
{
|
||||||
xlnt::workbook wb;
|
//xlnt::workbook wb;
|
||||||
new_sheet = wb.create_sheet();
|
//new_sheet = wb.create_sheet();
|
||||||
named_range = NamedRange("test_nr", [(new_sheet, "A1")]);
|
//named_range = NamedRange("test_nr", [(new_sheet, "A1")]);
|
||||||
wb.add_named_range(named_range);
|
//wb.add_named_range(named_range);
|
||||||
wb.remove_named_range(named_range);
|
//wb.remove_named_range(named_range);
|
||||||
named_ranges_list = wb.get_named_ranges();
|
//named_ranges_list = wb.get_named_ranges();
|
||||||
assert named_range not in named_ranges_list;
|
//assert named_range not in named_ranges_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_add_local_named_range2()
|
void test_add_local_named_range2()
|
||||||
{
|
{
|
||||||
make_tmpdir();
|
//make_tmpdir();
|
||||||
xlnt::workbook wb;
|
//xlnt::workbook wb;
|
||||||
new_sheet = wb.create_sheet();
|
//new_sheet = wb.create_sheet();
|
||||||
named_range = NamedRange("test_nr", [(new_sheet, "A1")]);
|
//named_range = NamedRange("test_nr", [(new_sheet, "A1")]);
|
||||||
named_range.scope = new_sheet;
|
//named_range.scope = new_sheet;
|
||||||
wb.add_named_range(named_range);
|
//wb.add_named_range(named_range);
|
||||||
dest_filename = osp.join(TMPDIR, "local_named_range_book.xlsx");
|
//dest_filename = osp.join(TMPDIR, "local_named_range_book.xlsx");
|
||||||
wb.save(dest_filename);
|
//wb.save(dest_filename);
|
||||||
clean_tmpdir();
|
//clean_tmpdir();
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_write_regular_date()
|
void test_write_regular_date()
|
||||||
{
|
{
|
||||||
make_tmpdir();
|
//make_tmpdir();
|
||||||
today = datetime.datetime(2010, 1, 18, 14, 15, 20, 1600);
|
//today = datetime.datetime(2010, 1, 18, 14, 15, 20, 1600);
|
||||||
|
|
||||||
book = Workbook();
|
//book = Workbook();
|
||||||
sheet = book.get_active_sheet();
|
//sheet = book.get_active_sheet();
|
||||||
sheet.cell("A1").value = today;
|
//sheet.cell("A1").value = today;
|
||||||
dest_filename = osp.join(TMPDIR, "date_read_write_issue.xlsx");
|
//dest_filename = osp.join(TMPDIR, "date_read_write_issue.xlsx");
|
||||||
book.save(dest_filename);
|
//book.save(dest_filename);
|
||||||
|
|
||||||
test_book = load_workbook(dest_filename);
|
//test_book = load_workbook(dest_filename);
|
||||||
test_sheet = test_book.get_active_sheet();
|
//test_sheet = test_book.get_active_sheet();
|
||||||
|
|
||||||
TS_ASSERT_EQUALS(test_sheet.cell("A1"), today);
|
//TS_ASSERT_EQUALS(test_sheet.cell("A1"), today);
|
||||||
clean_tmpdir();
|
//clean_tmpdir();
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_write_regular_float()
|
void test_write_regular_float()
|
||||||
{
|
{
|
||||||
make_tmpdir();
|
//make_tmpdir();
|
||||||
float float_value = 1.0 / 3.0;
|
//float float_value = 1.0 / 3.0;
|
||||||
book = Workbook();
|
//book = Workbook();
|
||||||
sheet = book.get_active_sheet();
|
//sheet = book.get_active_sheet();
|
||||||
sheet.cell("A1").value = float_value;
|
//sheet.cell("A1").value = float_value;
|
||||||
dest_filename = osp.join(TMPDIR, "float_read_write_issue.xlsx");
|
//dest_filename = osp.join(TMPDIR, "float_read_write_issue.xlsx");
|
||||||
book.save(dest_filename);
|
//book.save(dest_filename);
|
||||||
|
|
||||||
test_book = load_workbook(dest_filename);
|
//test_book = load_workbook(dest_filename);
|
||||||
test_sheet = test_book.get_active_sheet();
|
//test_sheet = test_book.get_active_sheet();
|
||||||
|
|
||||||
TS_ASSERT_EQUALS(test_sheet.cell("A1").value, float_value);*/
|
//TS_ASSERT_EQUALS(test_sheet.cell("A1").value, float_value);*/
|
||||||
clean_tmpdir();
|
//clean_tmpdir();
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_bad_encoding2()
|
void test_bad_encoding2()
|
||||||
{
|
{
|
||||||
char pound = 163;
|
//char pound = 163;
|
||||||
std::string test_string = ("Compound Value (" + std::string(1, pound) + ")").encode("latin1");
|
//std::string test_string = ("Compound Value (" + std::string(1, pound) + ")").encode("latin1");
|
||||||
|
|
||||||
xlnt::workbook utf_book;
|
//xlnt::workbook utf_book;
|
||||||
xlnt::worksheet utf_sheet = utf_book.get_active_sheet();
|
//xlnt::worksheet utf_sheet = utf_book.get_active_sheet();
|
||||||
|
|
||||||
TS_ASSERT_THROWS(UnicodeDecode, utf_sheet.cell("A1") = test_string);
|
//TS_ASSERT_THROWS(UnicodeDecode, utf_sheet.cell("A1") = test_string);
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_good_encoding2()
|
void test_good_encoding2()
|
||||||
{
|
{
|
||||||
char pound = 163;
|
//char pound = 163;
|
||||||
std::string test_string = ("Compound Value (" + std::string(1, pound) + ")").encode("latin1");
|
//std::string test_string = ("Compound Value (" + std::string(1, pound) + ")").encode("latin1");
|
||||||
|
|
||||||
lat_book = Workbook(encoding = "latin1");
|
//lat_book = Workbook(encoding = "latin1");
|
||||||
lat_sheet = lat_book.get_active_sheet();
|
//lat_sheet = lat_book.get_active_sheet();
|
||||||
lat_sheet.cell("A1").value = test_string;
|
//lat_sheet.cell("A1").value = test_string;
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_add_named_range2()
|
void test_add_named_range2()
|
||||||
{
|
{
|
||||||
wb = Workbook();
|
//wb = Workbook();
|
||||||
new_sheet = wb.create_sheet();
|
//new_sheet = wb.create_sheet();
|
||||||
named_range = NamedRange("test_nr", [(new_sheet, "A1")]);
|
//named_range = NamedRange("test_nr", [(new_sheet, "A1")]);
|
||||||
wb.add_named_range(named_range);
|
//wb.add_named_range(named_range);
|
||||||
named_ranges_list = wb.get_named_ranges();
|
//named_ranges_list = wb.get_named_ranges();
|
||||||
assert named_range in named_ranges_list;
|
//assert named_range in named_ranges_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_get_named_range()
|
void test_get_named_range()
|
||||||
{
|
{
|
||||||
wb = Workbook();
|
//wb = Workbook();
|
||||||
new_sheet = wb.create_sheet();
|
//new_sheet = wb.create_sheet();
|
||||||
named_range = NamedRange("test_nr", [(new_sheet, "A1")]);
|
//named_range = NamedRange("test_nr", [(new_sheet, "A1")]);
|
||||||
wb.add_named_range(named_range);
|
//wb.add_named_range(named_range);
|
||||||
found_named_range = wb.get_named_range("test_nr");
|
//found_named_range = wb.get_named_range("test_nr");
|
||||||
TS_ASSERT_EQUALS(named_range, found_named_range);
|
//TS_ASSERT_EQUALS(named_range, found_named_range);
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_remove_named_range()
|
void test_remove_named_range()
|
||||||
{
|
{
|
||||||
wb = Workbook();
|
//wb = Workbook();
|
||||||
new_sheet = wb.create_sheet();
|
//new_sheet = wb.create_sheet();
|
||||||
named_range = NamedRange("test_nr", [(new_sheet, "A1")]);
|
//named_range = NamedRange("test_nr", [(new_sheet, "A1")]);
|
||||||
wb.add_named_range(named_range);
|
//wb.add_named_range(named_range);
|
||||||
wb.remove_named_range(named_range);
|
//wb.remove_named_range(named_range);
|
||||||
named_ranges_list = wb.get_named_ranges();
|
//named_ranges_list = wb.get_named_ranges();
|
||||||
assert named_range not in named_ranges_list;
|
//assert named_range not in named_ranges_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_add_local_named_range()
|
void test_add_local_named_range()
|
||||||
{
|
{
|
||||||
make_tmpdir();
|
//make_tmpdir();
|
||||||
wb = Workbook();
|
//wb = Workbook();
|
||||||
new_sheet = wb.create_sheet();
|
//new_sheet = wb.create_sheet();
|
||||||
named_range = NamedRange("test_nr", [(new_sheet, "A1")]);
|
//named_range = NamedRange("test_nr", [(new_sheet, "A1")]);
|
||||||
named_range.scope = new_sheet;
|
//named_range.scope = new_sheet;
|
||||||
wb.add_named_range(named_range);
|
//wb.add_named_range(named_range);
|
||||||
dest_filename = osp.join(TMPDIR, "local_named_range_book.xlsx");
|
//dest_filename = osp.join(TMPDIR, "local_named_range_book.xlsx");
|
||||||
wb.save(dest_filename);
|
//wb.save(dest_filename);
|
||||||
clean_tmpdir();
|
//clean_tmpdir();
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_write_regular_date2()
|
void test_write_regular_date2()
|
||||||
{
|
{
|
||||||
make_tmpdir();
|
//make_tmpdir();
|
||||||
today = datetime.datetime(2010, 1, 18, 14, 15, 20, 1600);
|
//today = datetime.datetime(2010, 1, 18, 14, 15, 20, 1600);
|
||||||
|
|
||||||
book = Workbook();
|
//book = Workbook();
|
||||||
sheet = book.get_active_sheet();
|
//sheet = book.get_active_sheet();
|
||||||
sheet.cell("A1").value = today;
|
//sheet.cell("A1").value = today;
|
||||||
dest_filename = osp.join(TMPDIR, "date_read_write_issue.xlsx");
|
//dest_filename = osp.join(TMPDIR, "date_read_write_issue.xlsx");
|
||||||
book.save(dest_filename);
|
//book.save(dest_filename);
|
||||||
|
|
||||||
test_book = load_workbook(dest_filename);
|
//test_book = load_workbook(dest_filename);
|
||||||
test_sheet = test_book.get_active_sheet();
|
//test_sheet = test_book.get_active_sheet();
|
||||||
|
|
||||||
TS_ASSERT_EQUALS(test_sheet.cell("A1").value, today);
|
//TS_ASSERT_EQUALS(test_sheet.cell("A1").value, today);
|
||||||
clean_tmpdir();
|
//clean_tmpdir();
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_write_regular_float2()
|
void test_write_regular_float2()
|
||||||
{
|
{
|
||||||
make_tmpdir();
|
//make_tmpdir();
|
||||||
float float_value = 1.0 / 3.0;
|
//float float_value = 1.0 / 3.0;
|
||||||
xlnt::workbook book;
|
//xlnt::workbook book;
|
||||||
xlnt::worksheet sheet = book.get_active_sheet();
|
//xlnt::worksheet sheet = book.get_active_sheet();
|
||||||
sheet.cell("A1") = float_value;
|
//sheet.cell("A1") = float_value;
|
||||||
std::string dest_filename = osp.join(TMPDIR, "float_read_write_issue.xlsx");
|
//std::string dest_filename = osp.join(TMPDIR, "float_read_write_issue.xlsx");
|
||||||
book.save(dest_filename);
|
//book.save(dest_filename);
|
||||||
|
|
||||||
xlnt::workbook test_book;
|
//xlnt::workbook test_book;
|
||||||
test_book.load(dest_filename);
|
//test_book.load(dest_filename);
|
||||||
xlnt::worksheet test_sheet = test_book.get_active_sheet();
|
//xlnt::worksheet test_sheet = test_book.get_active_sheet();
|
||||||
|
|
||||||
TS_ASSERT_EQUALS(test_sheet.cell("A1"), float_value);
|
//TS_ASSERT_EQUALS(test_sheet.cell("A1"), float_value);
|
||||||
clean_tmpdir();
|
//clean_tmpdir();
|
||||||
}
|
}
|
||||||
|
|
||||||
// @raises(UnicodeDecodeError)
|
// @raises(UnicodeDecodeError)
|
||||||
|
@ -378,11 +372,11 @@ public:
|
||||||
|
|
||||||
void test_good_encoding()
|
void test_good_encoding()
|
||||||
{
|
{
|
||||||
char pound = 163;
|
//char pound = 163;
|
||||||
std::string test_string = ("Compound Value (" + std::string(1, pound) + ")").encode("latin1");
|
//std::string test_string = ("Compound Value (" + std::string(1, pound) + ")").encode("latin1");
|
||||||
|
|
||||||
xlnt::workbook lat_book("latin1");
|
//xlnt::workbook lat_book("latin1");
|
||||||
xlnt::worksheet lat_sheet = lat_book.get_active_sheet();
|
//xlnt::worksheet lat_sheet = lat_book.get_active_sheet();
|
||||||
lat_sheet.cell("A1") = test_string;
|
//lat_sheet.cell("A1") = test_string;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -122,7 +122,7 @@ public:
|
||||||
auto c_range_coord = ws.range("B12");
|
auto c_range_coord = ws.range("B12");
|
||||||
auto c_cell = ws.cell("B12");
|
auto c_cell = ws.cell("B12");
|
||||||
TS_ASSERT_EQUALS(c_range_coord, c_range_name);
|
TS_ASSERT_EQUALS(c_range_coord, c_range_name);
|
||||||
TS_ASSERT_EQUALS(c_range_coord, c_cell);
|
TS_ASSERT(c_range_coord[0][0] == c_cell);
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_garbage_collect()
|
void test_garbage_collect()
|
||||||
|
@ -135,7 +135,7 @@ public:
|
||||||
|
|
||||||
ws.garbage_collect();
|
ws.garbage_collect();
|
||||||
|
|
||||||
std::set<xlnt::cell> comparison_cells = {ws.cell("B2"), ws.cell("C4")};
|
std::list<xlnt::cell> comparison_cells = {ws.cell("B2"), ws.cell("C4")};
|
||||||
|
|
||||||
for(auto cell : ws.get_cell_collection())
|
for(auto cell : ws.get_cell_collection())
|
||||||
{
|
{
|
||||||
|
@ -156,14 +156,14 @@ public:
|
||||||
TS_ASSERT_EQUALS("rId1", ws.cell("A1").get_hyperlink_rel_id());
|
TS_ASSERT_EQUALS("rId1", ws.cell("A1").get_hyperlink_rel_id());
|
||||||
TS_ASSERT_EQUALS("rId1", ws.get_relationships()[0].get_id());
|
TS_ASSERT_EQUALS("rId1", ws.get_relationships()[0].get_id());
|
||||||
TS_ASSERT_EQUALS("http:test.com", ws.get_relationships()[0].get_target_uri());
|
TS_ASSERT_EQUALS("http:test.com", ws.get_relationships()[0].get_target_uri());
|
||||||
TS_ASSERT_EQUALS("External", ws.get_relationships()[0].get_target_mode());
|
TS_ASSERT_EQUALS(xlnt::target_mode::External, ws.get_relationships()[0].get_target_mode());
|
||||||
|
|
||||||
ws.cell("A2").set_hyperlink("http:test2.com");
|
ws.cell("A2").set_hyperlink("http:test2.com");
|
||||||
TS_ASSERT_EQUALS(ws.get_relationships().size(), 2);
|
TS_ASSERT_EQUALS(ws.get_relationships().size(), 2);
|
||||||
TS_ASSERT_EQUALS("rId2", ws.cell("A2").get_hyperlink_rel_id());
|
TS_ASSERT_EQUALS("rId2", ws.cell("A2").get_hyperlink_rel_id());
|
||||||
TS_ASSERT_EQUALS("rId2", ws.get_relationships()[1].get_id());
|
TS_ASSERT_EQUALS("rId2", ws.get_relationships()[1].get_id());
|
||||||
TS_ASSERT_EQUALS("http:test2.com", ws.get_relationships()[1].get_target_uri());
|
TS_ASSERT_EQUALS("http:test2.com", ws.get_relationships()[1].get_target_uri());
|
||||||
TS_ASSERT_EQUALS("External", ws.get_relationships()[1].get_target_mode());
|
TS_ASSERT_EQUALS(xlnt::target_mode::External, ws.get_relationships()[1].get_target_mode());
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_bad_relationship_type()
|
void test_bad_relationship_type()
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
class WriteTestSuite : public CxxTest::TestSuite
|
class WriteTestSuite : public CxxTest::TestSuite
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
std::string TMPDIR;
|
||||||
|
|
||||||
WriteTestSuite()
|
WriteTestSuite()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -17,153 +19,153 @@ public:
|
||||||
void test_write_empty_workbook()
|
void test_write_empty_workbook()
|
||||||
{
|
{
|
||||||
TemporaryDirectory temp_dir;
|
TemporaryDirectory temp_dir;
|
||||||
wb = Workbook();
|
xlnt::workbook wb;
|
||||||
dest_filename = os.path.join(TMPDIR, "empty_book.xlsx");
|
auto dest_filename = TMPDIR + "/empty_book.xlsx";
|
||||||
save_workbook(wb, dest_filename);
|
wb.save(dest_filename);
|
||||||
assert os.path.isfile(dest_filename);
|
TS_ASSERT(xlnt::file::exists(dest_filename));
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_write_virtual_workbook()
|
void test_write_virtual_workbook()
|
||||||
{
|
{
|
||||||
old_wb = Workbook();
|
/*xlnt::workbook old_wb;
|
||||||
saved_wb = save_virtual_workbook(old_wb);
|
saved_wb = save_virtual_workbook(old_wb);
|
||||||
new_wb = load_workbook(BytesIO(saved_wb));
|
new_wb = load_workbook(BytesIO(saved_wb));
|
||||||
assert new_wb;
|
assert new_wb;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_write_workbook_rels()
|
void test_write_workbook_rels()
|
||||||
{
|
{
|
||||||
wb = Workbook();
|
/*xlnt::workbook wb;
|
||||||
content = write_workbook_rels(wb);
|
content = write_workbook_rels(wb);
|
||||||
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
||||||
"workbook.xml.rels"), content);
|
"workbook.xml.rels"), content);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_write_workbook()
|
void test_write_workbook()
|
||||||
{
|
{
|
||||||
wb = Workbook();
|
/*xlnt::workbook wb;
|
||||||
content = write_workbook(wb);
|
content = write_workbook(wb);
|
||||||
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
||||||
"workbook.xml"), content);
|
"workbook.xml"), content);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void test_write_string_table()
|
void test_write_string_table()
|
||||||
{
|
{
|
||||||
table = {"hello": 1, "world" : 2, "nice" : 3};
|
/*table = {"hello": 1, "world" : 2, "nice" : 3};
|
||||||
content = write_string_table(table);
|
content = write_string_table(table);
|
||||||
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
||||||
"sharedStrings.xml"), content);
|
"sharedStrings.xml"), content);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_write_worksheet()
|
void test_write_worksheet()
|
||||||
{
|
{
|
||||||
wb = Workbook();
|
/*xlnt::workbook wb;
|
||||||
ws = wb.create_sheet();
|
auto ws = wb.create_sheet();
|
||||||
ws.cell("F42").value = "hello";
|
ws.cell("F42") = "hello";
|
||||||
content = write_worksheet(ws, {"hello": 0}, {});
|
content = write_worksheet(ws, {"hello": 0}, {});
|
||||||
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
||||||
"sheet1.xml"), content);
|
"sheet1.xml"), content);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_write_hidden_worksheet()
|
void test_write_hidden_worksheet()
|
||||||
{
|
{
|
||||||
wb = Workbook();
|
/*xlnt::workbook wb;
|
||||||
ws = wb.create_sheet();
|
auto ws = wb.create_sheet();
|
||||||
ws.sheet_state = ws.SHEETSTATE_HIDDEN;
|
ws.sheet_state = ws.SHEETSTATE_HIDDEN;
|
||||||
ws.cell("F42").value = "hello";
|
ws.cell("F42") = "hello";
|
||||||
content = write_worksheet(ws, {"hello": 0}, {});
|
content = write_worksheet(ws, {"hello": 0}, {});
|
||||||
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
||||||
"sheet1.xml"), content);
|
"sheet1.xml"), content);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_write_bool()
|
void test_write_bool()
|
||||||
{
|
{
|
||||||
wb = Workbook();
|
/*xlnt::workbook wb;
|
||||||
ws = wb.create_sheet();
|
auto ws = wb.create_sheet();
|
||||||
ws.cell("F42").value = False;
|
ws.cell("F42") = False;
|
||||||
ws.cell("F43").value = True;
|
ws.cell("F43") = True;
|
||||||
content = write_worksheet(ws, {}, {});
|
content = write_worksheet(ws, {}, {});
|
||||||
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
||||||
"sheet1_bool.xml"), content);
|
"sheet1_bool.xml"), content);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_write_formula()
|
void test_write_formula()
|
||||||
{
|
{
|
||||||
wb = Workbook();
|
/*xlnt::workbook wb;
|
||||||
ws = wb.create_sheet();
|
auto ws = wb.create_sheet();
|
||||||
ws.cell("F1").value = 10;
|
ws.cell("F1") = 10;
|
||||||
ws.cell("F2").value = 32;
|
ws.cell("F2") = 32;
|
||||||
ws.cell("F3").value = "=F1+F2";
|
ws.cell("F3") = "=F1+F2";
|
||||||
content = write_worksheet(ws, {}, {});
|
content = write_worksheet(ws, {}, {});
|
||||||
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
||||||
"sheet1_formula.xml"), content);
|
"sheet1_formula.xml"), content);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_write_style()
|
void test_write_style()
|
||||||
{
|
{
|
||||||
wb = Workbook();
|
/*xlnt::workbook wb;
|
||||||
ws = wb.create_sheet();
|
auto ws = wb.create_sheet();
|
||||||
ws.cell("F1").value = "13%";
|
ws.cell("F1") = "13%";
|
||||||
style_id_by_hash = StyleWriter(wb).get_style_by_hash();
|
style_id_by_hash = StyleWriter(wb).get_style_by_hash();
|
||||||
content = write_worksheet(ws, {}, style_id_by_hash);
|
content = write_worksheet(ws, {}, style_id_by_hash);
|
||||||
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
||||||
"sheet1_style.xml"), content);
|
"sheet1_style.xml"), content);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_write_height()
|
void test_write_height()
|
||||||
{
|
{
|
||||||
wb = Workbook();
|
/*xlnt::workbook wb;
|
||||||
ws = wb.create_sheet();
|
auto ws = wb.create_sheet();
|
||||||
ws.cell("F1").value = 10;
|
ws.cell("F1") = 10;
|
||||||
ws.row_dimensions[ws.cell("F1").row].height = 30;
|
ws.row_dimensions[ws.cell("F1").row].height = 30;
|
||||||
content = write_worksheet(ws, {}, {});
|
content = write_worksheet(ws, {}, {});
|
||||||
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
||||||
"sheet1_height.xml"), content);
|
"sheet1_height.xml"), content);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_write_hyperlink()
|
void test_write_hyperlink()
|
||||||
{
|
{
|
||||||
wb = Workbook();
|
/*xlnt::workbook wb;
|
||||||
ws = wb.create_sheet();
|
auto ws = wb.create_sheet();
|
||||||
ws.cell("A1").value = "test";
|
ws.cell("A1") = "test";
|
||||||
ws.cell("A1").hyperlink = "http:test.com";
|
ws.cell("A1").hyperlink = "http:test.com";
|
||||||
content = write_worksheet(ws, {"test": 0}, {});
|
content = write_worksheet(ws, {"test": 0}, {});
|
||||||
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
||||||
"sheet1_hyperlink.xml"), content);
|
"sheet1_hyperlink.xml"), content);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_write_hyperlink_rels()
|
void test_write_hyperlink_rels()
|
||||||
{
|
{
|
||||||
wb = Workbook();
|
/*xlnt::workbook wb;
|
||||||
ws = wb.create_sheet();
|
auto ws = wb.create_sheet();
|
||||||
TS_ASSERT_EQUALS(0, len(ws.relationships));
|
TS_ASSERT_EQUALS(0, len(ws.relationships));
|
||||||
ws.cell("A1").value = "test";
|
ws.cell("A1") = "test";
|
||||||
ws.cell("A1").hyperlink = "http:test.com/";
|
ws.cell("A1").hyperlink = "http:test.com/";
|
||||||
TS_ASSERT_EQUALS(1, len(ws.relationships));
|
TS_ASSERT_EQUALS(1, len(ws.relationships));
|
||||||
ws.cell("A2").value = "test";
|
ws.cell("A2") = "test";
|
||||||
ws.cell("A2").hyperlink = "http:test2.com/";
|
ws.cell("A2").hyperlink = "http:test2.com/";
|
||||||
TS_ASSERT_EQUALS(2, len(ws.relationships));
|
TS_ASSERT_EQUALS(2, len(ws.relationships));
|
||||||
content = write_worksheet_rels(ws, 1);
|
content = write_worksheet_rels(ws, 1);
|
||||||
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
||||||
"sheet1_hyperlink.xml.rels"), content);
|
"sheet1_hyperlink.xml.rels"), content);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_hyperlink_value()
|
void test_hyperlink_value()
|
||||||
{
|
{
|
||||||
wb = Workbook();
|
xlnt::workbook wb;
|
||||||
ws = wb.create_sheet();
|
auto ws = wb.create_sheet();
|
||||||
ws.cell("A1").hyperlink = "http:test.com";
|
ws.cell("A1").set_hyperlink("http:test.com");
|
||||||
TS_ASSERT_EQUALS("http:test.com", ws.cell("A1").value);
|
TS_ASSERT_EQUALS("http:test.com", ws.cell("A1"));
|
||||||
ws.cell("A1").value = "test";
|
ws.cell("A1") = "test";
|
||||||
TS_ASSERT_EQUALS("test", ws.cell("A1").value);
|
TS_ASSERT_EQUALS("test", ws.cell("A1"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_write_auto_filter()
|
void test_write_auto_filter()
|
||||||
{
|
{
|
||||||
wb = Workbook();
|
/*xlnt::workbook wb;
|
||||||
ws = wb.worksheets[0];
|
auto ws = wb[0];
|
||||||
ws.cell("F42").value = "hello";
|
ws.cell("F42") = "hello";
|
||||||
ws.auto_filter = "A1:F1";
|
ws.auto_filter = "A1:F1";
|
||||||
content = write_worksheet(ws, {"hello": 0}, {});
|
content = write_worksheet(ws, {"hello": 0}, {});
|
||||||
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
||||||
|
@ -171,69 +173,69 @@ public:
|
||||||
|
|
||||||
content = write_workbook(wb);
|
content = write_workbook(wb);
|
||||||
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
||||||
"workbook_auto_filter.xml"), content);
|
"workbook_auto_filter.xml"), content);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_freeze_panes_horiz()
|
void test_freeze_panes_horiz()
|
||||||
{
|
{
|
||||||
wb = Workbook();
|
/*xlnt::workbook wb;
|
||||||
ws = wb.create_sheet();
|
auto ws = wb.create_sheet();
|
||||||
ws.cell("F42").value = "hello";
|
ws.cell("F42") = "hello";
|
||||||
ws.freeze_panes = "A4";
|
ws.freeze_panes = "A4";
|
||||||
content = write_worksheet(ws, {"hello": 0}, {});
|
content = write_worksheet(ws, {"hello": 0}, {});
|
||||||
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
||||||
"sheet1_freeze_panes_horiz.xml"), content);
|
"sheet1_freeze_panes_horiz.xml"), content);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_freeze_panes_vert()
|
void test_freeze_panes_vert()
|
||||||
{
|
{
|
||||||
wb = Workbook();
|
/*xlnt::workbook wb;
|
||||||
ws = wb.create_sheet();
|
auto ws = wb.create_sheet();
|
||||||
ws.cell("F42").value = "hello";
|
ws.cell("F42") = "hello";
|
||||||
ws.freeze_panes = "D1";
|
ws.freeze_panes = "D1";
|
||||||
content = write_worksheet(ws, {"hello": 0}, {});
|
content = write_worksheet(ws, {"hello": 0}, {});
|
||||||
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
||||||
"sheet1_freeze_panes_vert.xml"), content);
|
"sheet1_freeze_panes_vert.xml"), content);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_freeze_panes_both()
|
void test_freeze_panes_both()
|
||||||
{
|
{
|
||||||
wb = Workbook();
|
/*xlnt::workbook wb;
|
||||||
ws = wb.create_sheet();
|
auto ws = wb.create_sheet();
|
||||||
ws.cell("F42").value = "hello";
|
ws.cell("F42") = "hello";
|
||||||
ws.freeze_panes = "D4";
|
ws.freeze_panes = "D4";
|
||||||
content = write_worksheet(ws, {"hello": 0}, {});
|
content = write_worksheet(ws, {"hello": 0}, {});
|
||||||
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
||||||
"sheet1_freeze_panes_both.xml"), content);
|
"sheet1_freeze_panes_both.xml"), content);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_long_number()
|
void test_long_number()
|
||||||
{
|
{
|
||||||
wb = Workbook();
|
/*xlnt::workbook wb;
|
||||||
ws = wb.create_sheet();
|
auto ws = wb.create_sheet();
|
||||||
ws.cell("A1").value = 9781231231230;
|
ws.cell("A1") = 9781231231230;
|
||||||
content = write_worksheet(ws, {}, {});
|
content = write_worksheet(ws, {}, {});
|
||||||
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
||||||
"long_number.xml"), content);
|
"long_number.xml"), content);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_decimal()
|
void test_decimal()
|
||||||
{
|
{
|
||||||
wb = Workbook();
|
/*xlnt::workbook wb;
|
||||||
ws = wb.create_sheet();
|
auto ws = wb.create_sheet();
|
||||||
ws.cell("A1").value = decimal.Decimal("3.14");
|
ws.cell("A1") = decimal.Decimal("3.14");
|
||||||
content = write_worksheet(ws, {}, {});
|
content = write_worksheet(ws, {}, {});
|
||||||
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
||||||
"decimal.xml"), content);
|
"decimal.xml"), content);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_short_number()
|
void test_short_number()
|
||||||
{
|
{
|
||||||
wb = Workbook();
|
/*xlnt::workbook wb;
|
||||||
ws = wb.create_sheet();
|
auto ws = wb.create_sheet();
|
||||||
ws.cell("A1").value = 1234567890;
|
ws.cell("A1") = 1234567890;
|
||||||
content = write_worksheet(ws, {}, {});
|
content = write_worksheet(ws, {}, {});
|
||||||
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
assert_equals_file_content(os.path.join(DATADIR, "writer", "expected", \
|
||||||
"short_number.xml"), content);
|
"short_number.xml"), content);*/
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -296,31 +296,31 @@ public:
|
||||||
|
|
||||||
static class TestDescription_suite_DumpTestSuite_test_table_builder : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_DumpTestSuite_test_table_builder : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_DumpTestSuite_test_table_builder() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 86, "test_table_builder" ) {}
|
TestDescription_suite_DumpTestSuite_test_table_builder() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 99, "test_table_builder" ) {}
|
||||||
void runTest() { suite_DumpTestSuite.test_table_builder(); }
|
void runTest() { suite_DumpTestSuite.test_table_builder(); }
|
||||||
} testDescription_suite_DumpTestSuite_test_table_builder;
|
} testDescription_suite_DumpTestSuite_test_table_builder;
|
||||||
|
|
||||||
static class TestDescription_suite_DumpTestSuite_test_open_too_many_files : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_DumpTestSuite_test_open_too_many_files : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_DumpTestSuite_test_open_too_many_files() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 113, "test_open_too_many_files" ) {}
|
TestDescription_suite_DumpTestSuite_test_open_too_many_files() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 121, "test_open_too_many_files" ) {}
|
||||||
void runTest() { suite_DumpTestSuite.test_open_too_many_files(); }
|
void runTest() { suite_DumpTestSuite.test_open_too_many_files(); }
|
||||||
} testDescription_suite_DumpTestSuite_test_open_too_many_files;
|
} testDescription_suite_DumpTestSuite_test_open_too_many_files;
|
||||||
|
|
||||||
static class TestDescription_suite_DumpTestSuite_test_create_temp_file : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_DumpTestSuite_test_create_temp_file : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_DumpTestSuite_test_create_temp_file() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 128, "test_create_temp_file" ) {}
|
TestDescription_suite_DumpTestSuite_test_create_temp_file() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 136, "test_create_temp_file" ) {}
|
||||||
void runTest() { suite_DumpTestSuite.test_create_temp_file(); }
|
void runTest() { suite_DumpTestSuite.test_create_temp_file(); }
|
||||||
} testDescription_suite_DumpTestSuite_test_create_temp_file;
|
} testDescription_suite_DumpTestSuite_test_create_temp_file;
|
||||||
|
|
||||||
static class TestDescription_suite_DumpTestSuite_test_dump_twice : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_DumpTestSuite_test_dump_twice : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_DumpTestSuite_test_dump_twice() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 138, "test_dump_twice" ) {}
|
TestDescription_suite_DumpTestSuite_test_dump_twice() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 143, "test_dump_twice" ) {}
|
||||||
void runTest() { suite_DumpTestSuite.test_dump_twice(); }
|
void runTest() { suite_DumpTestSuite.test_dump_twice(); }
|
||||||
} testDescription_suite_DumpTestSuite_test_dump_twice;
|
} testDescription_suite_DumpTestSuite_test_dump_twice;
|
||||||
|
|
||||||
static class TestDescription_suite_DumpTestSuite_test_append_after_save : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_DumpTestSuite_test_append_after_save : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_DumpTestSuite_test_append_after_save() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 154, "test_append_after_save" ) {}
|
TestDescription_suite_DumpTestSuite_test_append_after_save() : CxxTest::RealTestDescription( Tests_DumpTestSuite, suiteDescription_DumpTestSuite, 159, "test_append_after_save" ) {}
|
||||||
void runTest() { suite_DumpTestSuite.test_append_after_save(); }
|
void runTest() { suite_DumpTestSuite.test_append_after_save(); }
|
||||||
} testDescription_suite_DumpTestSuite_test_append_after_save;
|
} testDescription_suite_DumpTestSuite_test_append_after_save;
|
||||||
|
|
||||||
|
@ -339,37 +339,37 @@ public:
|
||||||
|
|
||||||
static class TestDescription_suite_IterTestSuite_test_read_fast_integrated : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_IterTestSuite_test_read_fast_integrated : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_IterTestSuite_test_read_fast_integrated() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 29, "test_read_fast_integrated" ) {}
|
TestDescription_suite_IterTestSuite_test_read_fast_integrated() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 32, "test_read_fast_integrated" ) {}
|
||||||
void runTest() { suite_IterTestSuite.test_read_fast_integrated(); }
|
void runTest() { suite_IterTestSuite.test_read_fast_integrated(); }
|
||||||
} testDescription_suite_IterTestSuite_test_read_fast_integrated;
|
} testDescription_suite_IterTestSuite_test_read_fast_integrated;
|
||||||
|
|
||||||
static class TestDescription_suite_IterTestSuite_test_get_boundaries_range : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_IterTestSuite_test_get_boundaries_range : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_IterTestSuite_test_get_boundaries_range() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 49, "test_get_boundaries_range" ) {}
|
TestDescription_suite_IterTestSuite_test_get_boundaries_range() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 52, "test_get_boundaries_range" ) {}
|
||||||
void runTest() { suite_IterTestSuite.test_get_boundaries_range(); }
|
void runTest() { suite_IterTestSuite.test_get_boundaries_range(); }
|
||||||
} testDescription_suite_IterTestSuite_test_get_boundaries_range;
|
} testDescription_suite_IterTestSuite_test_get_boundaries_range;
|
||||||
|
|
||||||
static class TestDescription_suite_IterTestSuite_test_get_boundaries_one : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_IterTestSuite_test_get_boundaries_one : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_IterTestSuite_test_get_boundaries_one() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 54, "test_get_boundaries_one" ) {}
|
TestDescription_suite_IterTestSuite_test_get_boundaries_one() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 57, "test_get_boundaries_one" ) {}
|
||||||
void runTest() { suite_IterTestSuite.test_get_boundaries_one(); }
|
void runTest() { suite_IterTestSuite.test_get_boundaries_one(); }
|
||||||
} testDescription_suite_IterTestSuite_test_get_boundaries_one;
|
} testDescription_suite_IterTestSuite_test_get_boundaries_one;
|
||||||
|
|
||||||
static class TestDescription_suite_IterTestSuite_test_read_single_cell_range : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_IterTestSuite_test_read_single_cell_range : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_IterTestSuite_test_read_single_cell_range() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 59, "test_read_single_cell_range" ) {}
|
TestDescription_suite_IterTestSuite_test_read_single_cell_range() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 62, "test_read_single_cell_range" ) {}
|
||||||
void runTest() { suite_IterTestSuite.test_read_single_cell_range(); }
|
void runTest() { suite_IterTestSuite.test_read_single_cell_range(); }
|
||||||
} testDescription_suite_IterTestSuite_test_read_single_cell_range;
|
} testDescription_suite_IterTestSuite_test_read_single_cell_range;
|
||||||
|
|
||||||
static class TestDescription_suite_IterTestSuite_test_read_fast_integrated2 : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_IterTestSuite_test_read_fast_integrated2 : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_IterTestSuite_test_read_fast_integrated2() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 67, "test_read_fast_integrated2" ) {}
|
TestDescription_suite_IterTestSuite_test_read_fast_integrated2() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 70, "test_read_fast_integrated2" ) {}
|
||||||
void runTest() { suite_IterTestSuite.test_read_fast_integrated2(); }
|
void runTest() { suite_IterTestSuite.test_read_fast_integrated2(); }
|
||||||
} testDescription_suite_IterTestSuite_test_read_fast_integrated2;
|
} testDescription_suite_IterTestSuite_test_read_fast_integrated2;
|
||||||
|
|
||||||
static class TestDescription_suite_IterTestSuite_test_read_single_cell_date : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_IterTestSuite_test_read_single_cell_date : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_IterTestSuite_test_read_single_cell_date() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 85, "test_read_single_cell_date" ) {}
|
TestDescription_suite_IterTestSuite_test_read_single_cell_date() : CxxTest::RealTestDescription( Tests_IterTestSuite, suiteDescription_IterTestSuite, 88, "test_read_single_cell_date" ) {}
|
||||||
void runTest() { suite_IterTestSuite.test_read_single_cell_date(); }
|
void runTest() { suite_IterTestSuite.test_read_single_cell_date(); }
|
||||||
} testDescription_suite_IterTestSuite_test_read_single_cell_date;
|
} testDescription_suite_IterTestSuite_test_read_single_cell_date;
|
||||||
|
|
||||||
|
@ -382,13 +382,13 @@ CxxTest::StaticSuiteDescription suiteDescription_MetaTestSuite( "../../source/te
|
||||||
|
|
||||||
static class TestDescription_suite_MetaTestSuite_test_write_content_types : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_MetaTestSuite_test_write_content_types : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_MetaTestSuite_test_write_content_types() : CxxTest::RealTestDescription( Tests_MetaTestSuite, suiteDescription_MetaTestSuite, 16, "test_write_content_types" ) {}
|
TestDescription_suite_MetaTestSuite_test_write_content_types() : CxxTest::RealTestDescription( Tests_MetaTestSuite, suiteDescription_MetaTestSuite, 21, "test_write_content_types" ) {}
|
||||||
void runTest() { suite_MetaTestSuite.test_write_content_types(); }
|
void runTest() { suite_MetaTestSuite.test_write_content_types(); }
|
||||||
} testDescription_suite_MetaTestSuite_test_write_content_types;
|
} testDescription_suite_MetaTestSuite_test_write_content_types;
|
||||||
|
|
||||||
static class TestDescription_suite_MetaTestSuite_test_write_root_rels : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_MetaTestSuite_test_write_root_rels : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_MetaTestSuite_test_write_root_rels() : CxxTest::RealTestDescription( Tests_MetaTestSuite, suiteDescription_MetaTestSuite, 26, "test_write_root_rels" ) {}
|
TestDescription_suite_MetaTestSuite_test_write_root_rels() : CxxTest::RealTestDescription( Tests_MetaTestSuite, suiteDescription_MetaTestSuite, 31, "test_write_root_rels" ) {}
|
||||||
void runTest() { suite_MetaTestSuite.test_write_root_rels(); }
|
void runTest() { suite_MetaTestSuite.test_write_root_rels(); }
|
||||||
} testDescription_suite_MetaTestSuite_test_write_root_rels;
|
} testDescription_suite_MetaTestSuite_test_write_root_rels;
|
||||||
|
|
||||||
|
@ -718,13 +718,13 @@ public:
|
||||||
|
|
||||||
static class TestDescription_suite_PropsTestSuite_test_write_properties_core : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_PropsTestSuite_test_write_properties_core : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_PropsTestSuite_test_write_properties_core() : CxxTest::RealTestDescription( Tests_PropsTestSuite, suiteDescription_PropsTestSuite, 94, "test_write_properties_core" ) {}
|
TestDescription_suite_PropsTestSuite_test_write_properties_core() : CxxTest::RealTestDescription( Tests_PropsTestSuite, suiteDescription_PropsTestSuite, 82, "test_write_properties_core" ) {}
|
||||||
void runTest() { suite_PropsTestSuite.test_write_properties_core(); }
|
void runTest() { suite_PropsTestSuite.test_write_properties_core(); }
|
||||||
} testDescription_suite_PropsTestSuite_test_write_properties_core;
|
} testDescription_suite_PropsTestSuite_test_write_properties_core;
|
||||||
|
|
||||||
static class TestDescription_suite_PropsTestSuite_test_write_properties_app : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_PropsTestSuite_test_write_properties_app : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_PropsTestSuite_test_write_properties_app() : CxxTest::RealTestDescription( Tests_PropsTestSuite, suiteDescription_PropsTestSuite, 106, "test_write_properties_app" ) {}
|
TestDescription_suite_PropsTestSuite_test_write_properties_app() : CxxTest::RealTestDescription( Tests_PropsTestSuite, suiteDescription_PropsTestSuite, 94, "test_write_properties_app" ) {}
|
||||||
void runTest() { suite_PropsTestSuite.test_write_properties_app(); }
|
void runTest() { suite_PropsTestSuite.test_write_properties_app(); }
|
||||||
} testDescription_suite_PropsTestSuite_test_write_properties_app;
|
} testDescription_suite_PropsTestSuite_test_write_properties_app;
|
||||||
|
|
||||||
|
@ -1046,207 +1046,201 @@ public:
|
||||||
void runTest() { suite_WorkbookTestSuite.test_add_correct_sheet(); }
|
void runTest() { suite_WorkbookTestSuite.test_add_correct_sheet(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_add_correct_sheet;
|
} testDescription_suite_WorkbookTestSuite_test_add_correct_sheet;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_add_incorrect_sheet : public CxxTest::RealTestDescription {
|
|
||||||
public:
|
|
||||||
TestDescription_suite_WorkbookTestSuite_test_add_incorrect_sheet() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 45, "test_add_incorrect_sheet" ) {}
|
|
||||||
void runTest() { suite_WorkbookTestSuite.test_add_incorrect_sheet(); }
|
|
||||||
} testDescription_suite_WorkbookTestSuite_test_add_incorrect_sheet;
|
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_create_sheet_readonly : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_create_sheet_readonly : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_create_sheet_readonly() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 51, "test_create_sheet_readonly" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_create_sheet_readonly() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 45, "test_create_sheet_readonly" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_create_sheet_readonly(); }
|
void runTest() { suite_WorkbookTestSuite.test_create_sheet_readonly(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_create_sheet_readonly;
|
} testDescription_suite_WorkbookTestSuite_test_create_sheet_readonly;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_remove_sheet : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_remove_sheet : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_remove_sheet() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 58, "test_remove_sheet" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_remove_sheet() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 52, "test_remove_sheet" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_remove_sheet(); }
|
void runTest() { suite_WorkbookTestSuite.test_remove_sheet(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_remove_sheet;
|
} testDescription_suite_WorkbookTestSuite_test_remove_sheet;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_get_sheet_by_name : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_get_sheet_by_name : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_get_sheet_by_name() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 66, "test_get_sheet_by_name" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_get_sheet_by_name() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 60, "test_get_sheet_by_name" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_get_sheet_by_name(); }
|
void runTest() { suite_WorkbookTestSuite.test_get_sheet_by_name(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_get_sheet_by_name;
|
} testDescription_suite_WorkbookTestSuite_test_get_sheet_by_name;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_get_index2 : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_get_index2 : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_get_index2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 76, "test_get_index2" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_get_index2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 70, "test_get_index2" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_get_index2(); }
|
void runTest() { suite_WorkbookTestSuite.test_get_index2(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_get_index2;
|
} testDescription_suite_WorkbookTestSuite_test_get_index2;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_get_sheet_names : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_get_sheet_names : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_get_sheet_names() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 84, "test_get_sheet_names" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_get_sheet_names() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 78, "test_get_sheet_names" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_get_sheet_names(); }
|
void runTest() { suite_WorkbookTestSuite.test_get_sheet_names(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_get_sheet_names;
|
} testDescription_suite_WorkbookTestSuite_test_get_sheet_names;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_get_named_ranges2 : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_get_named_ranges2 : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_get_named_ranges2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 96, "test_get_named_ranges2" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_get_named_ranges2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 90, "test_get_named_ranges2" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_get_named_ranges2(); }
|
void runTest() { suite_WorkbookTestSuite.test_get_named_ranges2(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_get_named_ranges2;
|
} testDescription_suite_WorkbookTestSuite_test_get_named_ranges2;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_get_active_sheet2 : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_get_active_sheet2 : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_get_active_sheet2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 101, "test_get_active_sheet2" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_get_active_sheet2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 95, "test_get_active_sheet2" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_get_active_sheet2(); }
|
void runTest() { suite_WorkbookTestSuite.test_get_active_sheet2(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_get_active_sheet2;
|
} testDescription_suite_WorkbookTestSuite_test_get_active_sheet2;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_create_sheet2 : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_create_sheet2 : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_create_sheet2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 108, "test_create_sheet2" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_create_sheet2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 102, "test_create_sheet2" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_create_sheet2(); }
|
void runTest() { suite_WorkbookTestSuite.test_create_sheet2(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_create_sheet2;
|
} testDescription_suite_WorkbookTestSuite_test_create_sheet2;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_create_sheet_with_name2 : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_create_sheet_with_name2 : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_create_sheet_with_name2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 115, "test_create_sheet_with_name2" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_create_sheet_with_name2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 109, "test_create_sheet_with_name2" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_create_sheet_with_name2(); }
|
void runTest() { suite_WorkbookTestSuite.test_create_sheet_with_name2(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_create_sheet_with_name2;
|
} testDescription_suite_WorkbookTestSuite_test_create_sheet_with_name2;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_add_correct_sheet2 : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_add_correct_sheet2 : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_add_correct_sheet2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 122, "test_add_correct_sheet2" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_add_correct_sheet2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 116, "test_add_correct_sheet2" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_add_correct_sheet2(); }
|
void runTest() { suite_WorkbookTestSuite.test_add_correct_sheet2(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_add_correct_sheet2;
|
} testDescription_suite_WorkbookTestSuite_test_add_correct_sheet2;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_add_incorrect_sheet2 : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_add_incorrect_sheet2 : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_add_incorrect_sheet2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 131, "test_add_incorrect_sheet2" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_add_incorrect_sheet2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 125, "test_add_incorrect_sheet2" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_add_incorrect_sheet2(); }
|
void runTest() { suite_WorkbookTestSuite.test_add_incorrect_sheet2(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_add_incorrect_sheet2;
|
} testDescription_suite_WorkbookTestSuite_test_add_incorrect_sheet2;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_create_sheet_readonly2 : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_create_sheet_readonly2 : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_create_sheet_readonly2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 137, "test_create_sheet_readonly2" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_create_sheet_readonly2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 131, "test_create_sheet_readonly2" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_create_sheet_readonly2(); }
|
void runTest() { suite_WorkbookTestSuite.test_create_sheet_readonly2(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_create_sheet_readonly2;
|
} testDescription_suite_WorkbookTestSuite_test_create_sheet_readonly2;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_remove_sheet2 : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_remove_sheet2 : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_remove_sheet2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 144, "test_remove_sheet2" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_remove_sheet2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 138, "test_remove_sheet2" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_remove_sheet2(); }
|
void runTest() { suite_WorkbookTestSuite.test_remove_sheet2(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_remove_sheet2;
|
} testDescription_suite_WorkbookTestSuite_test_remove_sheet2;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_get_sheet_by_name2 : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_get_sheet_by_name2 : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_get_sheet_by_name2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 152, "test_get_sheet_by_name2" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_get_sheet_by_name2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 146, "test_get_sheet_by_name2" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_get_sheet_by_name2(); }
|
void runTest() { suite_WorkbookTestSuite.test_get_sheet_by_name2(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_get_sheet_by_name2;
|
} testDescription_suite_WorkbookTestSuite_test_get_sheet_by_name2;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_get_index : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_get_index : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_get_index() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 162, "test_get_index" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_get_index() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 156, "test_get_index" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_get_index(); }
|
void runTest() { suite_WorkbookTestSuite.test_get_index(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_get_index;
|
} testDescription_suite_WorkbookTestSuite_test_get_index;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_get_sheet_names2 : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_get_sheet_names2 : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_get_sheet_names2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 170, "test_get_sheet_names2" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_get_sheet_names2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 164, "test_get_sheet_names2" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_get_sheet_names2(); }
|
void runTest() { suite_WorkbookTestSuite.test_get_sheet_names2(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_get_sheet_names2;
|
} testDescription_suite_WorkbookTestSuite_test_get_sheet_names2;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_get_named_ranges : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_get_named_ranges : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_get_named_ranges() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 182, "test_get_named_ranges" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_get_named_ranges() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 176, "test_get_named_ranges" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_get_named_ranges(); }
|
void runTest() { suite_WorkbookTestSuite.test_get_named_ranges(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_get_named_ranges;
|
} testDescription_suite_WorkbookTestSuite_test_get_named_ranges;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_add_named_range : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_add_named_range : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_add_named_range() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 188, "test_add_named_range" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_add_named_range() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 182, "test_add_named_range" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_add_named_range(); }
|
void runTest() { suite_WorkbookTestSuite.test_add_named_range(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_add_named_range;
|
} testDescription_suite_WorkbookTestSuite_test_add_named_range;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_get_named_range2 : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_get_named_range2 : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_get_named_range2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 198, "test_get_named_range2" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_get_named_range2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 192, "test_get_named_range2" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_get_named_range2(); }
|
void runTest() { suite_WorkbookTestSuite.test_get_named_range2(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_get_named_range2;
|
} testDescription_suite_WorkbookTestSuite_test_get_named_range2;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_remove_named_range2 : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_remove_named_range2 : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_remove_named_range2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 208, "test_remove_named_range2" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_remove_named_range2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 202, "test_remove_named_range2" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_remove_named_range2(); }
|
void runTest() { suite_WorkbookTestSuite.test_remove_named_range2(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_remove_named_range2;
|
} testDescription_suite_WorkbookTestSuite_test_remove_named_range2;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_add_local_named_range2 : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_add_local_named_range2 : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_add_local_named_range2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 219, "test_add_local_named_range2" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_add_local_named_range2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 213, "test_add_local_named_range2" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_add_local_named_range2(); }
|
void runTest() { suite_WorkbookTestSuite.test_add_local_named_range2(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_add_local_named_range2;
|
} testDescription_suite_WorkbookTestSuite_test_add_local_named_range2;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_write_regular_date : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_write_regular_date : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_write_regular_date() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 232, "test_write_regular_date" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_write_regular_date() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 226, "test_write_regular_date" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_write_regular_date(); }
|
void runTest() { suite_WorkbookTestSuite.test_write_regular_date(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_write_regular_date;
|
} testDescription_suite_WorkbookTestSuite_test_write_regular_date;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_write_regular_float : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_write_regular_float : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_write_regular_float() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 250, "test_write_regular_float" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_write_regular_float() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 244, "test_write_regular_float" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_write_regular_float(); }
|
void runTest() { suite_WorkbookTestSuite.test_write_regular_float(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_write_regular_float;
|
} testDescription_suite_WorkbookTestSuite_test_write_regular_float;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_bad_encoding2 : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_bad_encoding2 : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_bad_encoding2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 267, "test_bad_encoding2" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_bad_encoding2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 261, "test_bad_encoding2" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_bad_encoding2(); }
|
void runTest() { suite_WorkbookTestSuite.test_bad_encoding2(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_bad_encoding2;
|
} testDescription_suite_WorkbookTestSuite_test_bad_encoding2;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_good_encoding2 : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_good_encoding2 : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_good_encoding2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 278, "test_good_encoding2" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_good_encoding2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 272, "test_good_encoding2" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_good_encoding2(); }
|
void runTest() { suite_WorkbookTestSuite.test_good_encoding2(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_good_encoding2;
|
} testDescription_suite_WorkbookTestSuite_test_good_encoding2;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_add_named_range2 : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_add_named_range2 : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_add_named_range2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 288, "test_add_named_range2" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_add_named_range2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 282, "test_add_named_range2" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_add_named_range2(); }
|
void runTest() { suite_WorkbookTestSuite.test_add_named_range2(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_add_named_range2;
|
} testDescription_suite_WorkbookTestSuite_test_add_named_range2;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_get_named_range : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_get_named_range : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_get_named_range() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 298, "test_get_named_range" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_get_named_range() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 292, "test_get_named_range" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_get_named_range(); }
|
void runTest() { suite_WorkbookTestSuite.test_get_named_range(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_get_named_range;
|
} testDescription_suite_WorkbookTestSuite_test_get_named_range;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_remove_named_range : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_remove_named_range : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_remove_named_range() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 308, "test_remove_named_range" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_remove_named_range() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 302, "test_remove_named_range" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_remove_named_range(); }
|
void runTest() { suite_WorkbookTestSuite.test_remove_named_range(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_remove_named_range;
|
} testDescription_suite_WorkbookTestSuite_test_remove_named_range;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_add_local_named_range : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_add_local_named_range : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_add_local_named_range() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 319, "test_add_local_named_range" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_add_local_named_range() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 313, "test_add_local_named_range" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_add_local_named_range(); }
|
void runTest() { suite_WorkbookTestSuite.test_add_local_named_range(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_add_local_named_range;
|
} testDescription_suite_WorkbookTestSuite_test_add_local_named_range;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_write_regular_date2 : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_write_regular_date2 : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_write_regular_date2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 332, "test_write_regular_date2" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_write_regular_date2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 326, "test_write_regular_date2" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_write_regular_date2(); }
|
void runTest() { suite_WorkbookTestSuite.test_write_regular_date2(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_write_regular_date2;
|
} testDescription_suite_WorkbookTestSuite_test_write_regular_date2;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_write_regular_float2 : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_write_regular_float2 : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_write_regular_float2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 350, "test_write_regular_float2" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_write_regular_float2() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 344, "test_write_regular_float2" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_write_regular_float2(); }
|
void runTest() { suite_WorkbookTestSuite.test_write_regular_float2(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_write_regular_float2;
|
} testDescription_suite_WorkbookTestSuite_test_write_regular_float2;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_bad_encoding : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_bad_encoding : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_bad_encoding() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 369, "test_bad_encoding" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_bad_encoding() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 363, "test_bad_encoding" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_bad_encoding(); }
|
void runTest() { suite_WorkbookTestSuite.test_bad_encoding(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_bad_encoding;
|
} testDescription_suite_WorkbookTestSuite_test_bad_encoding;
|
||||||
|
|
||||||
static class TestDescription_suite_WorkbookTestSuite_test_good_encoding : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WorkbookTestSuite_test_good_encoding : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WorkbookTestSuite_test_good_encoding() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 379, "test_good_encoding" ) {}
|
TestDescription_suite_WorkbookTestSuite_test_good_encoding() : CxxTest::RealTestDescription( Tests_WorkbookTestSuite, suiteDescription_WorkbookTestSuite, 373, "test_good_encoding" ) {}
|
||||||
void runTest() { suite_WorkbookTestSuite.test_good_encoding(); }
|
void runTest() { suite_WorkbookTestSuite.test_good_encoding(); }
|
||||||
} testDescription_suite_WorkbookTestSuite_test_good_encoding;
|
} testDescription_suite_WorkbookTestSuite_test_good_encoding;
|
||||||
|
|
||||||
|
@ -1434,127 +1428,127 @@ CxxTest::StaticSuiteDescription suiteDescription_WriteTestSuite( "../../source/t
|
||||||
|
|
||||||
static class TestDescription_suite_WriteTestSuite_test_write_empty_workbook : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WriteTestSuite_test_write_empty_workbook : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WriteTestSuite_test_write_empty_workbook() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 17, "test_write_empty_workbook" ) {}
|
TestDescription_suite_WriteTestSuite_test_write_empty_workbook() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 19, "test_write_empty_workbook" ) {}
|
||||||
void runTest() { suite_WriteTestSuite.test_write_empty_workbook(); }
|
void runTest() { suite_WriteTestSuite.test_write_empty_workbook(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_write_empty_workbook;
|
} testDescription_suite_WriteTestSuite_test_write_empty_workbook;
|
||||||
|
|
||||||
static class TestDescription_suite_WriteTestSuite_test_write_virtual_workbook : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WriteTestSuite_test_write_virtual_workbook : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WriteTestSuite_test_write_virtual_workbook() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 26, "test_write_virtual_workbook" ) {}
|
TestDescription_suite_WriteTestSuite_test_write_virtual_workbook() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 28, "test_write_virtual_workbook" ) {}
|
||||||
void runTest() { suite_WriteTestSuite.test_write_virtual_workbook(); }
|
void runTest() { suite_WriteTestSuite.test_write_virtual_workbook(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_write_virtual_workbook;
|
} testDescription_suite_WriteTestSuite_test_write_virtual_workbook;
|
||||||
|
|
||||||
static class TestDescription_suite_WriteTestSuite_test_write_workbook_rels : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WriteTestSuite_test_write_workbook_rels : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WriteTestSuite_test_write_workbook_rels() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 34, "test_write_workbook_rels" ) {}
|
TestDescription_suite_WriteTestSuite_test_write_workbook_rels() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 36, "test_write_workbook_rels" ) {}
|
||||||
void runTest() { suite_WriteTestSuite.test_write_workbook_rels(); }
|
void runTest() { suite_WriteTestSuite.test_write_workbook_rels(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_write_workbook_rels;
|
} testDescription_suite_WriteTestSuite_test_write_workbook_rels;
|
||||||
|
|
||||||
static class TestDescription_suite_WriteTestSuite_test_write_workbook : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WriteTestSuite_test_write_workbook : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WriteTestSuite_test_write_workbook() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 42, "test_write_workbook" ) {}
|
TestDescription_suite_WriteTestSuite_test_write_workbook() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 44, "test_write_workbook" ) {}
|
||||||
void runTest() { suite_WriteTestSuite.test_write_workbook(); }
|
void runTest() { suite_WriteTestSuite.test_write_workbook(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_write_workbook;
|
} testDescription_suite_WriteTestSuite_test_write_workbook;
|
||||||
|
|
||||||
static class TestDescription_suite_WriteTestSuite_test_write_string_table : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WriteTestSuite_test_write_string_table : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WriteTestSuite_test_write_string_table() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 51, "test_write_string_table" ) {}
|
TestDescription_suite_WriteTestSuite_test_write_string_table() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 53, "test_write_string_table" ) {}
|
||||||
void runTest() { suite_WriteTestSuite.test_write_string_table(); }
|
void runTest() { suite_WriteTestSuite.test_write_string_table(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_write_string_table;
|
} testDescription_suite_WriteTestSuite_test_write_string_table;
|
||||||
|
|
||||||
static class TestDescription_suite_WriteTestSuite_test_write_worksheet : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WriteTestSuite_test_write_worksheet : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WriteTestSuite_test_write_worksheet() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 59, "test_write_worksheet" ) {}
|
TestDescription_suite_WriteTestSuite_test_write_worksheet() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 61, "test_write_worksheet" ) {}
|
||||||
void runTest() { suite_WriteTestSuite.test_write_worksheet(); }
|
void runTest() { suite_WriteTestSuite.test_write_worksheet(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_write_worksheet;
|
} testDescription_suite_WriteTestSuite_test_write_worksheet;
|
||||||
|
|
||||||
static class TestDescription_suite_WriteTestSuite_test_write_hidden_worksheet : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WriteTestSuite_test_write_hidden_worksheet : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WriteTestSuite_test_write_hidden_worksheet() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 69, "test_write_hidden_worksheet" ) {}
|
TestDescription_suite_WriteTestSuite_test_write_hidden_worksheet() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 71, "test_write_hidden_worksheet" ) {}
|
||||||
void runTest() { suite_WriteTestSuite.test_write_hidden_worksheet(); }
|
void runTest() { suite_WriteTestSuite.test_write_hidden_worksheet(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_write_hidden_worksheet;
|
} testDescription_suite_WriteTestSuite_test_write_hidden_worksheet;
|
||||||
|
|
||||||
static class TestDescription_suite_WriteTestSuite_test_write_bool : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WriteTestSuite_test_write_bool : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WriteTestSuite_test_write_bool() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 80, "test_write_bool" ) {}
|
TestDescription_suite_WriteTestSuite_test_write_bool() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 82, "test_write_bool" ) {}
|
||||||
void runTest() { suite_WriteTestSuite.test_write_bool(); }
|
void runTest() { suite_WriteTestSuite.test_write_bool(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_write_bool;
|
} testDescription_suite_WriteTestSuite_test_write_bool;
|
||||||
|
|
||||||
static class TestDescription_suite_WriteTestSuite_test_write_formula : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WriteTestSuite_test_write_formula : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WriteTestSuite_test_write_formula() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 91, "test_write_formula" ) {}
|
TestDescription_suite_WriteTestSuite_test_write_formula() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 93, "test_write_formula" ) {}
|
||||||
void runTest() { suite_WriteTestSuite.test_write_formula(); }
|
void runTest() { suite_WriteTestSuite.test_write_formula(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_write_formula;
|
} testDescription_suite_WriteTestSuite_test_write_formula;
|
||||||
|
|
||||||
static class TestDescription_suite_WriteTestSuite_test_write_style : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WriteTestSuite_test_write_style : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WriteTestSuite_test_write_style() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 103, "test_write_style" ) {}
|
TestDescription_suite_WriteTestSuite_test_write_style() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 105, "test_write_style" ) {}
|
||||||
void runTest() { suite_WriteTestSuite.test_write_style(); }
|
void runTest() { suite_WriteTestSuite.test_write_style(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_write_style;
|
} testDescription_suite_WriteTestSuite_test_write_style;
|
||||||
|
|
||||||
static class TestDescription_suite_WriteTestSuite_test_write_height : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WriteTestSuite_test_write_height : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WriteTestSuite_test_write_height() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 114, "test_write_height" ) {}
|
TestDescription_suite_WriteTestSuite_test_write_height() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 116, "test_write_height" ) {}
|
||||||
void runTest() { suite_WriteTestSuite.test_write_height(); }
|
void runTest() { suite_WriteTestSuite.test_write_height(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_write_height;
|
} testDescription_suite_WriteTestSuite_test_write_height;
|
||||||
|
|
||||||
static class TestDescription_suite_WriteTestSuite_test_write_hyperlink : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WriteTestSuite_test_write_hyperlink : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WriteTestSuite_test_write_hyperlink() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 125, "test_write_hyperlink" ) {}
|
TestDescription_suite_WriteTestSuite_test_write_hyperlink() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 127, "test_write_hyperlink" ) {}
|
||||||
void runTest() { suite_WriteTestSuite.test_write_hyperlink(); }
|
void runTest() { suite_WriteTestSuite.test_write_hyperlink(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_write_hyperlink;
|
} testDescription_suite_WriteTestSuite_test_write_hyperlink;
|
||||||
|
|
||||||
static class TestDescription_suite_WriteTestSuite_test_write_hyperlink_rels : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WriteTestSuite_test_write_hyperlink_rels : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WriteTestSuite_test_write_hyperlink_rels() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 136, "test_write_hyperlink_rels" ) {}
|
TestDescription_suite_WriteTestSuite_test_write_hyperlink_rels() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 138, "test_write_hyperlink_rels" ) {}
|
||||||
void runTest() { suite_WriteTestSuite.test_write_hyperlink_rels(); }
|
void runTest() { suite_WriteTestSuite.test_write_hyperlink_rels(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_write_hyperlink_rels;
|
} testDescription_suite_WriteTestSuite_test_write_hyperlink_rels;
|
||||||
|
|
||||||
static class TestDescription_suite_WriteTestSuite_test_hyperlink_value : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WriteTestSuite_test_hyperlink_value : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WriteTestSuite_test_hyperlink_value() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 152, "test_hyperlink_value" ) {}
|
TestDescription_suite_WriteTestSuite_test_hyperlink_value() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 154, "test_hyperlink_value" ) {}
|
||||||
void runTest() { suite_WriteTestSuite.test_hyperlink_value(); }
|
void runTest() { suite_WriteTestSuite.test_hyperlink_value(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_hyperlink_value;
|
} testDescription_suite_WriteTestSuite_test_hyperlink_value;
|
||||||
|
|
||||||
static class TestDescription_suite_WriteTestSuite_test_write_auto_filter : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WriteTestSuite_test_write_auto_filter : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WriteTestSuite_test_write_auto_filter() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 162, "test_write_auto_filter" ) {}
|
TestDescription_suite_WriteTestSuite_test_write_auto_filter() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 164, "test_write_auto_filter" ) {}
|
||||||
void runTest() { suite_WriteTestSuite.test_write_auto_filter(); }
|
void runTest() { suite_WriteTestSuite.test_write_auto_filter(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_write_auto_filter;
|
} testDescription_suite_WriteTestSuite_test_write_auto_filter;
|
||||||
|
|
||||||
static class TestDescription_suite_WriteTestSuite_test_freeze_panes_horiz : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WriteTestSuite_test_freeze_panes_horiz : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WriteTestSuite_test_freeze_panes_horiz() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 177, "test_freeze_panes_horiz" ) {}
|
TestDescription_suite_WriteTestSuite_test_freeze_panes_horiz() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 179, "test_freeze_panes_horiz" ) {}
|
||||||
void runTest() { suite_WriteTestSuite.test_freeze_panes_horiz(); }
|
void runTest() { suite_WriteTestSuite.test_freeze_panes_horiz(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_freeze_panes_horiz;
|
} testDescription_suite_WriteTestSuite_test_freeze_panes_horiz;
|
||||||
|
|
||||||
static class TestDescription_suite_WriteTestSuite_test_freeze_panes_vert : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WriteTestSuite_test_freeze_panes_vert : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WriteTestSuite_test_freeze_panes_vert() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 188, "test_freeze_panes_vert" ) {}
|
TestDescription_suite_WriteTestSuite_test_freeze_panes_vert() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 190, "test_freeze_panes_vert" ) {}
|
||||||
void runTest() { suite_WriteTestSuite.test_freeze_panes_vert(); }
|
void runTest() { suite_WriteTestSuite.test_freeze_panes_vert(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_freeze_panes_vert;
|
} testDescription_suite_WriteTestSuite_test_freeze_panes_vert;
|
||||||
|
|
||||||
static class TestDescription_suite_WriteTestSuite_test_freeze_panes_both : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WriteTestSuite_test_freeze_panes_both : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WriteTestSuite_test_freeze_panes_both() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 199, "test_freeze_panes_both" ) {}
|
TestDescription_suite_WriteTestSuite_test_freeze_panes_both() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 201, "test_freeze_panes_both" ) {}
|
||||||
void runTest() { suite_WriteTestSuite.test_freeze_panes_both(); }
|
void runTest() { suite_WriteTestSuite.test_freeze_panes_both(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_freeze_panes_both;
|
} testDescription_suite_WriteTestSuite_test_freeze_panes_both;
|
||||||
|
|
||||||
static class TestDescription_suite_WriteTestSuite_test_long_number : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WriteTestSuite_test_long_number : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WriteTestSuite_test_long_number() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 210, "test_long_number" ) {}
|
TestDescription_suite_WriteTestSuite_test_long_number() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 212, "test_long_number" ) {}
|
||||||
void runTest() { suite_WriteTestSuite.test_long_number(); }
|
void runTest() { suite_WriteTestSuite.test_long_number(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_long_number;
|
} testDescription_suite_WriteTestSuite_test_long_number;
|
||||||
|
|
||||||
static class TestDescription_suite_WriteTestSuite_test_decimal : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WriteTestSuite_test_decimal : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WriteTestSuite_test_decimal() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 220, "test_decimal" ) {}
|
TestDescription_suite_WriteTestSuite_test_decimal() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 222, "test_decimal" ) {}
|
||||||
void runTest() { suite_WriteTestSuite.test_decimal(); }
|
void runTest() { suite_WriteTestSuite.test_decimal(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_decimal;
|
} testDescription_suite_WriteTestSuite_test_decimal;
|
||||||
|
|
||||||
static class TestDescription_suite_WriteTestSuite_test_short_number : public CxxTest::RealTestDescription {
|
static class TestDescription_suite_WriteTestSuite_test_short_number : public CxxTest::RealTestDescription {
|
||||||
public:
|
public:
|
||||||
TestDescription_suite_WriteTestSuite_test_short_number() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 230, "test_short_number" ) {}
|
TestDescription_suite_WriteTestSuite_test_short_number() : CxxTest::RealTestDescription( Tests_WriteTestSuite, suiteDescription_WriteTestSuite, 232, "test_short_number" ) {}
|
||||||
void runTest() { suite_WriteTestSuite.test_short_number(); }
|
void runTest() { suite_WriteTestSuite.test_short_number(); }
|
||||||
} testDescription_suite_WriteTestSuite_test_short_number;
|
} testDescription_suite_WriteTestSuite_test_short_number;
|
||||||
|
|
||||||
|
|
|
@ -859,6 +859,22 @@ struct alignment
|
||||||
int indent = 0;
|
int indent = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class string_table
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
int operator[](const std::string &key) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
class string_table_builder
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
void add(const std::string &string);
|
||||||
|
string_table &get_table() { return table_; }
|
||||||
|
const string_table &get_table() const { return table_; }
|
||||||
|
private:
|
||||||
|
string_table table_;
|
||||||
|
};
|
||||||
|
|
||||||
class number_format
|
class number_format
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -909,8 +925,10 @@ public:
|
||||||
|
|
||||||
format get_format_code() const { return format_code_; }
|
format get_format_code() const { return format_code_; }
|
||||||
void set_format_code(format format_code) { format_code_ = format_code; }
|
void set_format_code(format format_code) { format_code_ = format_code; }
|
||||||
|
void set_format_code(const std::string &format_code) { custom_format_code_ = format_code; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
std::string custom_format_code_ = "";
|
||||||
format format_code_ = format::general;
|
format format_code_ = format::general;
|
||||||
int format_index_ = 0;
|
int format_index_ = 0;
|
||||||
};
|
};
|
||||||
|
@ -1053,6 +1071,15 @@ public:
|
||||||
type hidden;
|
type hidden;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class sheet_protection
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static std::string hash_password(const std::string &password);
|
||||||
|
|
||||||
|
void set_password(const std::string &password);
|
||||||
|
std::string get_hashed_password() const;
|
||||||
|
};
|
||||||
|
|
||||||
class style
|
class style
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -1214,6 +1241,7 @@ public:
|
||||||
bool operator==(const std::string &comparand) const;
|
bool operator==(const std::string &comparand) const;
|
||||||
bool operator==(const char *comparand) const;
|
bool operator==(const char *comparand) const;
|
||||||
bool operator==(const tm &comparand) const;
|
bool operator==(const tm &comparand) const;
|
||||||
|
bool operator==(const cell &comparand) const { return root_ == comparand.root_; }
|
||||||
|
|
||||||
friend bool operator==(std::nullptr_t, const cell &cell);
|
friend bool operator==(std::nullptr_t, const cell &cell);
|
||||||
friend bool operator==(bool comparand, const cell &cell);
|
friend bool operator==(bool comparand, const cell &cell);
|
||||||
|
@ -1359,6 +1387,8 @@ public:
|
||||||
static std::string write_root_rels(workbook &wb);
|
static std::string write_root_rels(workbook &wb);
|
||||||
static std::string write_worksheet(worksheet &ws);
|
static std::string write_worksheet(worksheet &ws);
|
||||||
static std::string get_document_content(const std::string &filename);
|
static std::string get_document_content(const std::string &filename);
|
||||||
|
static std::string create_temporary_file();
|
||||||
|
static std::string delete_temporary_file(const std::string &filename);
|
||||||
};
|
};
|
||||||
|
|
||||||
class workbook
|
class workbook
|
||||||
|
|
Loading…
Reference in New Issue
Block a user