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 DEBUG_FLAG =
false;
28 const QStringList NO_LOAD_STARTUP_FILES;
30 initializeLogging (
"engauge_test",
35 NO_REGRESSION_OPEN_FILE,
39 NO_LOAD_STARTUP_FILES);
43 void TestGraphCoords::testAnyColumnsRepeatNo ()
45 CoordPairVector vector;
47 vector.push_back (QPointF (100, 100));
48 vector.push_back (QPointF (300, 100));
49 vector.push_back (QPointF (200, 200));
51 QVERIFY (!m_callback->anyPointsRepeatPair (vector));
54 void TestGraphCoords::testAnyColumnsRepeatYes ()
56 CoordPairVector vector;
59 vector.push_back (QPointF (100, 100));
60 vector.push_back (QPointF (100, 100));
61 vector.push_back (QPointF (200, 200));
63 QVERIFY (m_callback->anyPointsRepeatPair (vector));
66 void TestGraphCoords::testThreeCollinearPointsNo ()
69 QTransform m (100, 300, 200,
73 QVERIFY (!m_callback->threePointsAreCollinear (m));
76 void TestGraphCoords::testThreeCollinearPointsYes ()
79 QTransform m (100, 150, 200,
83 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...