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 QString NO_ERROR_REPORT_LOG_FILE;
25 const QString NO_REGRESSION_OPEN_FILE;
26 const bool NO_GNUPLOT_LOG_FILES =
false;
27 const bool NO_REGRESSION_IMPORT =
false;
28 const bool NO_RESET =
false;
29 const bool NO_EXPORT_ONLY =
false;
30 const bool NO_EXTRACT_IMAGE_ONLY =
false;
31 const QString NO_EXTRACT_IMAGE_EXTENSION;
32 const bool DEBUG_FLAG =
false;
33 const QStringList NO_LOAD_STARTUP_FILES;
34 const QStringList NO_COMMAND_LINE;
36 initializeLogging (
"engauge_test",
41 NO_REGRESSION_OPEN_FILE,
46 NO_EXTRACT_IMAGE_ONLY,
47 NO_EXTRACT_IMAGE_EXTENSION,
48 NO_LOAD_STARTUP_FILES,
53 void TestGraphCoords::testAnyColumnsRepeatNo ()
55 CoordPairVector vector;
57 vector.push_back (QPointF (100, 100));
58 vector.push_back (QPointF (300, 100));
59 vector.push_back (QPointF (200, 200));
61 QVERIFY (!m_callback->anyPointsRepeatPair (vector,
65 void TestGraphCoords::testAnyColumnsRepeatYes ()
67 CoordPairVector vector;
70 vector.push_back (QPointF (100, 100));
71 vector.push_back (QPointF (100, 100));
72 vector.push_back (QPointF (200, 200));
74 QVERIFY (m_callback->anyPointsRepeatPair (vector,
78 void TestGraphCoords::testThreeCollinearPointsNo ()
81 QTransform m (100, 300, 200,
85 QVERIFY (!m_callback->threePointsAreCollinear (m));
88 void TestGraphCoords::testThreeCollinearPointsYes ()
91 QTransform m (100, 150, 200,
95 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...