File indexing completed on 2023-09-24 11:36:40

0001 /*
0002     File                 : SpreadsheetTest.h
0003     Project              : LabPlot
0004     Description          : Tests for the Spreadsheet
0005     --------------------------------------------------------------------
0006     SPDX-FileCopyrightText: 2020-2023 Alexander Semke <alexander.semke@web.de>
0007     SPDX-FileCopyrightText: 2022 Stefan Gerlach <stefan.gerlach@uni.kn>
0008 
0009     SPDX-License-Identifier: GPL-2.0-or-later
0010 */
0011 
0012 #ifndef SPREADSHEETTEST_H
0013 #define SPREADSHEETTEST_H
0014 
0015 #include "../CommonTest.h"
0016 
0017 class Spreadsheet;
0018 
0019 class SpreadsheetTest : public CommonTest {
0020     Q_OBJECT
0021 
0022 private Q_SLOTS:
0023     // copy and paste
0024 
0025     // handling of different column modes
0026     void testCopyPasteColumnMode00();
0027     void testCopyPasteColumnMode01();
0028     void testCopyPasteColumnMode02();
0029     void testCopyPasteColumnMode03();
0030     void testCopyPasteColumnMode04();
0031     void testCopyPasteColumnMode05();
0032     void testCopyPasteColumnMode06();
0033 
0034     // handling of spreadsheet size changes
0035     void testCopyPasteSizeChange00();
0036     void testCopyPasteSizeChange01();
0037 
0038     void testCopyPasteUtf8();
0039 
0040     // sorting
0041     void testSortSingleNumeric1();
0042     void testSortSingleNumeric2();
0043     void testSortSingleInteger1();
0044     void testSortSingleInteger2();
0045     void testSortSingleBigInt1();
0046     void testSortSingleBigInt2();
0047     void testSortSingleText1();
0048     void testSortSingleText2();
0049     void testSortSingleDateTime1();
0050     void testSortSingleDateTime2();
0051 
0052     void testSortNumeric1();
0053     void testSortNumeric2();
0054     void testSortInteger1();
0055     void testSortInteger2();
0056     void testSortBigInt1();
0057     void testSortBigInt2();
0058     void testSortText1();
0059     void testSortText2();
0060     void testSortDateTime1();
0061     void testSortDateTime2();
0062 
0063     void testSortPerformanceNumeric1();
0064     void testSortPerformanceNumeric2();
0065 
0066     // drop/mask
0067     void testRemoveRowsWithMissingValues();
0068     void testMaskRowsWithMissingValues();
0069 
0070     // flattening
0071     void testFlatten00();
0072     void testFlatten01();
0073     void testFlatten02();
0074     void testFlatten03();
0075 
0076     // search&replace
0077     void testSearchSimple00();
0078 
0079     void testSearchExtended00();
0080     void testSearchExtended01();
0081     void testSearchExtended02();
0082     void testSearchExtended03();
0083 
0084     void testSearchFindAll();
0085     void testSearchReplaceAll();
0086 
0087     // size changes
0088     void testInsertRows();
0089     void testRemoveRows();
0090     void testInsertColumns();
0091     void testRemoveColumns();
0092 
0093     void testInsertRowsBegin(); // insert row at the beginning
0094     void testRemoveRowsBegin(); // remove first row
0095 
0096     void testInsertRowsSuppressUpdate();
0097     void testInsertColumnsSuppressUpdate();
0098 
0099     void testLinkSpreadsheetsUndoRedo();
0100     void testLinkSpreadsheetDeleteAdd();
0101     void testLinkSpreadsheetAddRow();
0102     void testLinkSpreadsheetRemoveRow();
0103     void testLinkSpreadsheetRecalculate();
0104     void testLinkSpreadsheetSaveLoad();
0105 
0106     // statistics spreadsheet
0107     void testStatisticsSpreadsheetToggle();
0108     void testStatisticsSpreadsheetChangeMetrics();
0109     void testStatisticsSpreadsheetChildIndex();
0110     void testStatisticsSpreadsheetChildIndexAfterUndoRedo();
0111 
0112 #ifdef HAVE_VECTOR_BLF
0113     void testLinkSpreadSheetImportBLF();
0114 #endif // HAVE_VECTOR_BLF
0115 
0116     void testNaming();
0117 
0118 private:
0119     Spreadsheet* createSearchReplaceSpreadsheet();
0120 };
0121 
0122 #endif