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

0001 /* This file is part of the KDE project
0002    Copyright 2007 Stefan Nikolaus <stefan.nikolaus@kdemail.net>
0003    Copyright 2006 Ariya Hidayat <ariya@kde.org>
0004 
0005    This library is free software; you can redistribute it and/or
0006    modify it under the terms of the GNU Library General Public
0007    License as published by the Free Software Foundation; only
0008    version 2 of the License.
0009 
0010    This library is distributed in the hope that it will be useful,
0011    but WITHOUT ANY WARRANTY; without even the implied warranty of
0012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0013    Library General Public License for more details.
0014 
0015    You should have received a copy of the GNU Library General Public License
0016    along with this library; see the file COPYING.LIB.  If not, write to
0017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0018    Boston, MA 02110-1301, USA.
0019 */
0020 
0021 #ifndef CALLIGRA_SHEETS_TEST_ENGINEERING_FUNCTIONS
0022 #define CALLIGRA_SHEETS_TEST_ENGINEERING_FUNCTIONS
0023 
0024 #include <QObject>
0025 
0026 #include <Value.h>
0027 
0028 namespace Calligra
0029 {
0030 namespace Sheets
0031 {
0032 
0033 class TestEngineeringFunctions: public QObject
0034 {
0035     Q_OBJECT
0036 
0037 private Q_SLOTS:
0038     void initTestCase();
0039     
0040     void testBIN2DEC();
0041     void testBIN2OCT();
0042     void testBIN2HEX();
0043     void testCOMPLEX();
0044     void testCONVERT();
0045     void testDEC2HEX();
0046     void testDEC2BIN();
0047     void testDEC2OCT();
0048     void testDELTA();
0049     void testERF();
0050     void testERFC();
0051     void testGESTEP();
0052     void testHEX2BIN();
0053     void testHEX2DEC();
0054     void testHEX2OCT();
0055     void testIMABS();
0056     void testIMAGINARY();
0057     void testIMARGUMENT();
0058     void testIMCONJUGATE();
0059     void testIMCOS();
0060     void testIMCOSH();
0061     void testIMCOT();
0062     void testIMCSC();
0063     void testIMCSCH();
0064     void testIMDIV();
0065     void testIMEXP();
0066     void testIMLN();
0067     void testIMLOG10();
0068     void testIMLOG2();
0069     void testIMPOWER();
0070     void testIMPRODUCT();
0071     void testIMREAL();
0072     void testIMSEC();
0073     void testIMSECH();
0074     void testIMSIN();
0075     void testIMSINH();
0076     void testIMSQRT();
0077     void testIMSUB();
0078     void testIMSUM();
0079     void testIMTAN();
0080     void testIMTANH();
0081     void testOCT2BIN();
0082     void testOCT2DEC();
0083     void testOCT2HEX();
0084     
0085 private:
0086     Value evaluate(const QString&);
0087 };
0088 
0089 } // namespace Sheets
0090 } // namespace Calligra
0091 
0092 #endif // CALLIGRA_SHEETS_TEST_ENGINEERING_FUNCTIONS