1 #include "CallbackUpdateTransform.h"
3 #include "MainWindow.h"
4 #include <QtTest/QtTest>
5 #include "Test/TestGraphCoords.h"
9 const
double EPSILON = 0.0;
15 DOCUMENT_AXES_POINTS_REQUIRED_3);
18 void TestGraphCoords::cleanupTestCase ()
22 void TestGraphCoords::initTestCase ()
24 const bool NO_DROP_REGRESSION =
false;
25 const QString NO_ERROR_REPORT_LOG_FILE;
26 const QString NO_REGRESSION_OPEN_FILE;
27 const bool NO_GNUPLOT_LOG_FILES =
false;
28 const bool NO_REGRESSION_IMPORT =
false;
29 const bool NO_RESET =
false;
30 const bool NO_EXPORT_ONLY =
false;
31 const bool NO_EXTRACT_IMAGE_ONLY =
false;
32 const QString NO_EXTRACT_IMAGE_EXTENSION;
33 const bool DEBUG_FLAG =
false;
34 const QStringList NO_LOAD_STARTUP_FILES;
35 const QStringList NO_COMMAND_LINE;
37 initializeLogging (
"engauge_test",
42 NO_REGRESSION_OPEN_FILE,
48 NO_EXTRACT_IMAGE_ONLY,
49 NO_EXTRACT_IMAGE_EXTENSION,
50 NO_LOAD_STARTUP_FILES,
55 void TestGraphCoords::testAnyColumnsRepeatNo ()
57 CoordPairVector vector;
59 vector.push_back (QPointF (100, 100));
60 vector.push_back (QPointF (300, 100));
61 vector.push_back (QPointF (200, 200));
63 QVERIFY (!m_callback->anyPointsRepeatPair (vector,
67 void TestGraphCoords::testAnyColumnsRepeatYes ()
69 CoordPairVector vector;
72 vector.push_back (QPointF (100, 100));
73 vector.push_back (QPointF (100, 100));
74 vector.push_back (QPointF (200, 200));
76 QVERIFY (m_callback->anyPointsRepeatPair (vector,
80 void TestGraphCoords::testThreeCollinearPointsNo ()
83 QTransform m (100, 300, 200,
87 QVERIFY (!m_callback->threePointsAreCollinear (m));
90 void TestGraphCoords::testThreeCollinearPointsYes ()
93 QTransform m (100, 150, 200,
97 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...