Engauge Digitizer  2
 All Classes Functions Variables Typedefs Enumerations Friends Pages
TestFitting.h
1 #ifndef TEST_FITTING_H
2 #define TEST_FITTING_H
3 
4 #include <QObject>
5 
7 class TestFitting : public QObject
8 {
9  Q_OBJECT
10 public:
12  explicit TestFitting(QObject *parent = 0);
13 
14 private slots:
15  void cleanupTestCase ();
16  void initTestCase ();
17 
18  // Test exact fit cases, for which the order equals the number of points minus 1
19  void testFunctionExactFit01 ();
20  void testFunctionExactFit12 ();
21  void testFunctionExactFit23 ();
22  void testFunctionExactFit34 ();
23 
24  // Test overfitted cases, for which the order is equal to, or greater than, the number of points
25  void testFunctionOverfit11 ();
26  void testFunctionOverfit22 ();
27  void testFunctionOverfit33 ();
28  void testFunctionOverfit44 ();
29 
30  // Test underfitted cases, for which the order is less than the number of points minus 1
31  void testFunctionUnderfit02 ();
32  void testFunctionUnderfit13 ();
33  void testFunctionUnderfit24 ();
34  void testFunctionUnderfit35 ();
35 
36  // Test case where non-function data was entered even though points should be functional
37  void testNonFunction ();
38 
39  private:
40  bool generalFunctionTest (int order,
41  int numPoints) const;
42  bool generalNonFunctionTest () const;
43 };
44 
45 #endif // TEST_FITTING_H
Unit test of Fitting classes.
Definition: TestFitting.h:7
TestFitting(QObject *parent=0)
Single constructor.
Definition: TestFitting.cpp:15