2 #include "MainWindow.h"
3 #include <QtTest/QtTest>
4 #include "Test/TestZoomTransition.h"
5 #include "ZoomTransition.h"
11 const
bool FILL_CHECKED = true;
12 const
bool FILL_UNCHECKED = false;
13 const
double M11 = 1.9;
14 const
double M22 = 1.49;
21 void TestZoomTransition::cleanupTestCase ()
26 void TestZoomTransition::initTestCase ()
28 const QString NO_ERROR_REPORT_LOG_FILE;
29 const QString NO_REGRESSION_OPEN_FILE;
30 const bool NO_GNUPLOT_LOG_FILES =
false;
31 const bool NO_REGRESSION_IMPORT =
false;
32 const bool NO_RESET =
false;
33 const bool NO_EXPORT_ONLY =
false;
34 const bool NO_EXTRACT_IMAGE_ONLY =
false;
35 const QString NO_EXTRACT_IMAGE_EXTENSION;
36 const bool DEBUG_FLAG =
false;
37 const QStringList NO_LOAD_STARTUP_FILES;
38 const QStringList NO_COMMAND_LINE;
40 initializeLogging (
"engauge_test",
45 NO_REGRESSION_OPEN_FILE,
50 NO_EXTRACT_IMAGE_ONLY,
51 NO_EXTRACT_IMAGE_EXTENSION,
52 NO_LOAD_STARTUP_FILES,
57 void TestZoomTransition::testInAtClosestEnum ()
60 ZoomFactor zoomFactorNew = zoomTransition.
zoomIn (ZOOM_16_TO_1,
66 QVERIFY (zoomFactorNew == ZOOM_16_TO_1);
69 void TestZoomTransition::testInBeforeClosestFromEnum ()
72 ZoomFactor zoomFactorNew = zoomTransition.
zoomIn (ZOOM_1_TO_1,
77 QVERIFY (zoomFactorNew == ZOOM_1_TO_1_CLOSER);
80 void TestZoomTransition::testInBeforeClosestFromFill ()
83 ZoomFactor zoomFactorNew = zoomTransition.
zoomIn (ZOOM_FILL,
88 QVERIFY (zoomFactorNew == ZOOM_2_TO_1);
91 void TestZoomTransition::testOutAtFarthestEnum ()
94 ZoomFactor zoomFactorNew = zoomTransition.
zoomOut (ZOOM_1_TO_16,
100 QVERIFY (zoomFactorNew == ZOOM_1_TO_16);
103 void TestZoomTransition::testOutBeforeFarthestFromEnum ()
106 ZoomFactor zoomFactorNew = zoomTransition.
zoomOut (ZOOM_1_TO_1,
111 QVERIFY (zoomFactorNew == ZOOM_1_TO_1_FARTHER);
114 void TestZoomTransition::testOutBeforeFarthestFromFill ()
117 ZoomFactor zoomFactorNew = zoomTransition.
zoomOut (ZOOM_FILL,
122 QVERIFY (zoomFactorNew == ZOOM_1_TO_1_CLOSER);
Unit test of ZoomTransition class.
ZoomFactor zoomOut(ZoomFactor currentZoomFactor, double m11, double m22, bool actionZoomFillIsChecked) const
Zoom out.
Perform calculations to determine the next zoom setting given the current zoom setting, when zooming in or out.
ZoomFactor zoomIn(ZoomFactor currentZoomFactor, double m11, double m22, bool actionZoomFillIsChecked) const
Zoom in.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...