File indexing completed on 2024-05-12 16:35:54

0001 /* This file is part of the KDE project
0002    Copyright 2007 Sascha Pfau <MrPeacock@web.de>
0003 
0004    This library is free software; you can redistribute it and/or
0005    modify it under the terms of the GNU Library General Public
0006    License as published by the Free Software Foundation; only
0007    version 2 of the License.
0008 
0009    This library is distributed in the hope that it will be useful,
0010    but WITHOUT ANY WARRANTY; without even the implied warranty of
0011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012    Library General Public License for more details.
0013 
0014    You should have received a copy of the GNU Library General Public License
0015    along with this library; see the file COPYING.LIB.  If not, write to
0016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0017    Boston, MA 02110-1301, USA.
0018 */
0019 
0020 #ifndef CALLIGRA_SHEETS_TEST_DATETIME_FUNCTIONS
0021 #define CALLIGRA_SHEETS_TEST_DATETIME_FUNCTIONS
0022 
0023 #include <QObject>
0024 
0025 #include <Value.h>
0026 
0027 namespace Calligra
0028 {
0029 namespace Sheets
0030 {
0031 
0032 class TestDatetimeFunctions: public QObject
0033 {
0034     Q_OBJECT
0035 
0036 private Q_SLOTS:
0037     void initTestCase();
0038     void testYEARFRAC();
0039     void testDATEDIF();
0040     void testISLEAPYEAR();
0041     void testWEEKNUM();
0042     void testWEEKSINYEAR();
0043     void testWORKDAY();
0044     void testNETWORKDAY();
0045     void testUNIX2DATE();
0046     void testDATE2UNIX();
0047     void testDATE();
0048     void testDATEVALUE();
0049     void testDAY();
0050     void testDAYS();
0051     void testDAYSINMONTH();
0052     void testDAYSINYEAR();
0053     void testDAYS360();
0054     void testEDATE();
0055     void testEOMONTH();
0056     void testHOUR();
0057     void testISOWEEKNUM();
0058     void testMINUTE();
0059     void testMONTH();
0060     void testMONTHS();
0061     void testNOW();
0062     void testSECOND();
0063     void testTIME();
0064     void testTIMEVALUE();
0065     void testTODAY();
0066     void testWEEKDAY();
0067     void testYEAR();
0068     void testYEARS();
0069     void testWEEKS();
0070 
0071 private:
0072     Value evaluate(const QString&, Value& ex);
0073 };
0074 
0075 } // namespace Sheets
0076 } // namespace Calligra
0077 
0078 #endif // CALLIGRA_SHEETS_TEST_DATETIME_FUNCTIONS