mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Add pivot tables tests
This commit is contained in:
Binary file not shown.
@ -309,4 +309,43 @@ TEST_F(XlsbSimpleTests2, SlicerCacheTest)
|
||||
ASSERT_EQ(fileContent, exampleContent);
|
||||
}
|
||||
|
||||
TEST_F(XlsbSimpleTests2, PivotTableTest)
|
||||
{
|
||||
auto tempDir = XlsbSimpleTests2::tempDir;
|
||||
std::wstring path1(tempDir + FILE_SEPARATOR_STR + L"result_unpacked"+ FILE_SEPARATOR_STR + L"xl" +
|
||||
FILE_SEPARATOR_STR + L"pivotTables" + FILE_SEPARATOR_STR + L"pivotTable2.bin");
|
||||
std::wstring path2(tempDir + FILE_SEPARATOR_STR +L"example_unpacked"+ FILE_SEPARATOR_STR + L"xl" +
|
||||
FILE_SEPARATOR_STR + L"pivotTables" + FILE_SEPARATOR_STR + L"pivotTable2.bin");
|
||||
std::vector<char> fileContent;
|
||||
std::vector<char> exampleContent;
|
||||
ASSERT_EQ(readBinaryFiles(path1, path2, fileContent, exampleContent), 0);
|
||||
ASSERT_EQ(fileContent, exampleContent);
|
||||
}
|
||||
|
||||
TEST_F(XlsbSimpleTests2, PivotCacheDefTest)
|
||||
{
|
||||
auto tempDir = XlsbSimpleTests2::tempDir;
|
||||
std::wstring path1(tempDir + FILE_SEPARATOR_STR + L"result_unpacked"+ FILE_SEPARATOR_STR + L"xl" +
|
||||
FILE_SEPARATOR_STR + L"pivotCache" + FILE_SEPARATOR_STR + L"pivotCacheDefinition2.bin");
|
||||
std::wstring path2(tempDir + FILE_SEPARATOR_STR +L"example_unpacked"+ FILE_SEPARATOR_STR + L"xl" +
|
||||
FILE_SEPARATOR_STR + L"pivotCache" + FILE_SEPARATOR_STR + L"pivotCacheDefinition2.bin");
|
||||
std::vector<char> fileContent;
|
||||
std::vector<char> exampleContent;
|
||||
ASSERT_EQ(readBinaryFiles(path1, path2, fileContent, exampleContent), 0);
|
||||
ASSERT_EQ(fileContent, exampleContent);
|
||||
}
|
||||
|
||||
TEST_F(XlsbSimpleTests2, PivotCacheRecordsTest)
|
||||
{
|
||||
auto tempDir = XlsbSimpleTests2::tempDir;
|
||||
std::wstring path1(tempDir + FILE_SEPARATOR_STR + L"result_unpacked"+ FILE_SEPARATOR_STR + L"xl" +
|
||||
FILE_SEPARATOR_STR + L"pivotCache" + FILE_SEPARATOR_STR + L"pivotCacheRecords2.bin");
|
||||
std::wstring path2(tempDir + FILE_SEPARATOR_STR +L"example_unpacked"+ FILE_SEPARATOR_STR + L"xl" +
|
||||
FILE_SEPARATOR_STR + L"pivotCache" + FILE_SEPARATOR_STR + L"pivotCacheRecords2.bin");
|
||||
std::vector<char> fileContent;
|
||||
std::vector<char> exampleContent;
|
||||
ASSERT_EQ(readBinaryFiles(path1, path2, fileContent, exampleContent), 0);
|
||||
ASSERT_EQ(fileContent, exampleContent);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user