File indexing completed on 2024-05-19 04:34:08

0001 /***************************************************************************
0002  *                                                                         *
0003  *   copyright : (C) 2007 The University of Toronto                        *
0004  *                                                                         *
0005  *   This program is free software; you can redistribute it and/or modify  *
0006  *   it under the terms of the GNU General Public License as published by  *
0007  *   the Free Software Foundation; either version 2 of the License, or     *
0008  *   (at your option) any later version.                                   *
0009  *                                                                         *
0010  ***************************************************************************/
0011 
0012 #ifndef TESTEQPARSER_H
0013 #define TESTEQPARSER_H
0014 
0015 #include <QObject>
0016 
0017 class TestEqParser : public QObject
0018 {
0019   Q_OBJECT
0020   private:
0021     bool validateText(const char *equation, const char *expect);
0022     bool validateParserFailures(const char *equation);
0023     bool validateEquation(const char *equation, double x, double result, const double tol = 0.00000000001);
0024   private Q_SLOTS:
0025     void cleanupTestCase();
0026 
0027     void testEqParser();
0028 };
0029 
0030 #endif
0031 
0032 // vim: ts=2 sw=2 et