mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Add slicer tests
This commit is contained in:
@ -282,4 +282,31 @@ TEST_F(XlsbSimpleTests2, TablesTest)
|
||||
ASSERT_EQ(readBinaryFiles(path1, path2, fileContent, exampleContent), 0);
|
||||
ASSERT_EQ(fileContent, exampleContent);
|
||||
}
|
||||
|
||||
TEST_F(XlsbSimpleTests2, SlicerTest)
|
||||
{
|
||||
auto tempDir = XlsbSimpleTests2::tempDir;
|
||||
std::wstring path1(tempDir + FILE_SEPARATOR_STR + L"result_unpacked"+ FILE_SEPARATOR_STR + L"xl" +
|
||||
FILE_SEPARATOR_STR + L"slicers" + FILE_SEPARATOR_STR + L"slicer2.bin");
|
||||
std::wstring path2(tempDir + FILE_SEPARATOR_STR +L"example_unpacked"+ FILE_SEPARATOR_STR + L"xl" +
|
||||
FILE_SEPARATOR_STR + L"slicers" + FILE_SEPARATOR_STR + L"slicer2.bin");
|
||||
std::vector<char> fileContent;
|
||||
std::vector<char> exampleContent;
|
||||
ASSERT_EQ(readBinaryFiles(path1, path2, fileContent, exampleContent), 0);
|
||||
ASSERT_EQ(fileContent, exampleContent);
|
||||
}
|
||||
|
||||
TEST_F(XlsbSimpleTests2, SlicerCacheTest)
|
||||
{
|
||||
auto tempDir = XlsbSimpleTests2::tempDir;
|
||||
std::wstring path1(tempDir + FILE_SEPARATOR_STR + L"result_unpacked"+ FILE_SEPARATOR_STR + L"xl" +
|
||||
FILE_SEPARATOR_STR + L"slicerCaches" + FILE_SEPARATOR_STR + L"slicerCache2.bin");
|
||||
std::wstring path2(tempDir + FILE_SEPARATOR_STR +L"example_unpacked"+ FILE_SEPARATOR_STR + L"xl" +
|
||||
FILE_SEPARATOR_STR + L"slicerCaches" + FILE_SEPARATOR_STR + L"slicerCache2.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