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 DEBUG_FLAG =
false;
27 const QStringList NO_LOAD_STARTUP_FILES;
29 initializeLogging (
"engauge_test",
34 NO_REGRESSION_OPEN_FILE,
37 NO_LOAD_STARTUP_FILES);
41 void TestGraphCoords::testAnyColumnsRepeatNo ()
43 CoordPairVector vector;
45 vector.push_back (QPointF (100, 100));
46 vector.push_back (QPointF (300, 100));
47 vector.push_back (QPointF (200, 200));
49 QVERIFY (!m_callback->anyPointsRepeatPair (vector));
52 void TestGraphCoords::testAnyColumnsRepeatYes ()
54 CoordPairVector vector;
57 vector.push_back (QPointF (100, 100));
58 vector.push_back (QPointF (100, 100));
59 vector.push_back (QPointF (200, 200));
61 QVERIFY (m_callback->anyPointsRepeatPair (vector));
64 void TestGraphCoords::testThreeCollinearPointsNo ()
67 QTransform m (100, 300, 200,
71 QVERIFY (!m_callback->threePointsAreCollinear (m));
74 void TestGraphCoords::testThreeCollinearPointsYes ()
77 QTransform m (100, 150, 200,
81 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...