1 #include "CallbackUpdateTransform.h"
3 #include "MainWindow.h"
4 #include <QtTest/QtTest>
5 #include "Test/TestGraphCoords.h"
13 DOCUMENT_AXES_POINTS_REQUIRED_3);
16 void TestGraphCoords::cleanupTestCase ()
20 void TestGraphCoords::initTestCase ()
22 const QString NO_ERROR_REPORT_LOG_FILE;
23 const QString NO_REGRESSION_OPEN_FILE;
24 const bool NO_GNUPLOT_LOG_FILES =
false;
25 const bool NO_REGRESSION_IMPORT =
false;
26 const bool NO_RESET =
false;
27 const bool NO_EXPORT_ONLY =
false;
28 const bool DEBUG_FLAG =
false;
29 const QStringList NO_LOAD_STARTUP_FILES;
31 initializeLogging (
"engauge_test",
36 NO_REGRESSION_OPEN_FILE,
41 NO_LOAD_STARTUP_FILES);
45 void TestGraphCoords::testAnyColumnsRepeatNo ()
47 CoordPairVector vector;
49 vector.push_back (QPointF (100, 100));
50 vector.push_back (QPointF (300, 100));
51 vector.push_back (QPointF (200, 200));
53 QVERIFY (!m_callback->anyPointsRepeatPair (vector));
56 void TestGraphCoords::testAnyColumnsRepeatYes ()
58 CoordPairVector vector;
61 vector.push_back (QPointF (100, 100));
62 vector.push_back (QPointF (100, 100));
63 vector.push_back (QPointF (200, 200));
65 QVERIFY (m_callback->anyPointsRepeatPair (vector));
68 void TestGraphCoords::testThreeCollinearPointsNo ()
71 QTransform m (100, 300, 200,
75 QVERIFY (!m_callback->threePointsAreCollinear (m));
78 void TestGraphCoords::testThreeCollinearPointsYes ()
81 QTransform m (100, 150, 200,
85 QVERIFY (m_callback->threePointsAreCollinear (m));
Unit tests of graph coordinate sanity checking.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...