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 NO_EXTRACT_IMAGE_ONLY =
false;
29 const QString NO_EXTRACT_IMAGE_EXTENSION;
30 const bool DEBUG_FLAG =
false;
31 const QStringList NO_LOAD_STARTUP_FILES;
32 const QStringList NO_COMMAND_LINE;
34 initializeLogging (
"engauge_test",
39 NO_REGRESSION_OPEN_FILE,
44 NO_EXTRACT_IMAGE_ONLY,
45 NO_EXTRACT_IMAGE_EXTENSION,
46 NO_LOAD_STARTUP_FILES,
51 void TestGraphCoords::testAnyColumnsRepeatNo ()
53 CoordPairVector vector;
55 vector.push_back (QPointF (100, 100));
56 vector.push_back (QPointF (300, 100));
57 vector.push_back (QPointF (200, 200));
59 QVERIFY (!m_callback->anyPointsRepeatPair (vector));
62 void TestGraphCoords::testAnyColumnsRepeatYes ()
64 CoordPairVector vector;
67 vector.push_back (QPointF (100, 100));
68 vector.push_back (QPointF (100, 100));
69 vector.push_back (QPointF (200, 200));
71 QVERIFY (m_callback->anyPointsRepeatPair (vector));
74 void TestGraphCoords::testThreeCollinearPointsNo ()
77 QTransform m (100, 300, 200,
81 QVERIFY (!m_callback->threePointsAreCollinear (m));
84 void TestGraphCoords::testThreeCollinearPointsYes ()
87 QTransform m (100, 150, 200,
91 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...