File indexing completed on 2024-04-21 03:48:16

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     void testSearchFindAll();
0084 
0085     void testSearchReplaceNumeric();
0086     void testSearchReplaceText();
0087     void testSearchReplaceAll();
0088 
0089     // size changes
0090     void testInsertRows();
0091     void testRemoveRows();
0092     void testInsertColumns();
0093     void testRemoveColumns();
0094 
0095     void testInsertRowsBegin(); // insert row at the beginning
0096     void testRemoveRowsBegin(); // remove first row
0097 
0098     void testInsertRowsSuppressUpdate();
0099     void testInsertColumnsSuppressUpdate();
0100 
0101     void testLinkSpreadsheetsUndoRedo();
0102     void testLinkSpreadsheetDeleteAdd();
0103     void testLinkSpreadsheetAddRow();
0104     void testLinkSpreadsheetRemoveRow();
0105     void testLinkSpreadsheetRecalculate();
0106     void testLinkSpreadsheetRecalculateRowCountChange();
0107     void testLinkSpreadsheetSaveLoad();
0108     void testLinkSpreadsheetsModelDockUpdateCheckInsertRows();
0109     void testLinkSpreadsheetsModelDockUpdateCheckRemoveRows();
0110 
0111     // statistics spreadsheet
0112     void testStatisticsSpreadsheetToggle();
0113     void testStatisticsSpreadsheetChangeMetrics();
0114     void testStatisticsSpreadsheetChildIndex();
0115     void testStatisticsSpreadsheetChildIndexAfterUndoRedo();
0116 
0117 #ifdef HAVE_VECTOR_BLF
0118     void testLinkSpreadSheetImportBLF();
0119 #endif // HAVE_VECTOR_BLF
0120 
0121     void testNaming();
0122 
0123     void testClearColumns();
0124 
0125 private:
0126     Spreadsheet* createSearchReplaceSpreadsheet();
0127 };
0128 
0129 #endif