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 bool NO_DROP_REGRESSION =
false;
29 const QString NO_ERROR_REPORT_LOG_FILE;
30 const QString NO_REGRESSION_OPEN_FILE;
31 const bool NO_GNUPLOT_LOG_FILES =
false;
32 const bool NO_REGRESSION_IMPORT =
false;
33 const bool NO_RESET =
false;
34 const bool NO_EXPORT_ONLY =
false;
35 const bool NO_EXTRACT_IMAGE_ONLY =
false;
36 const QString NO_EXTRACT_IMAGE_EXTENSION;
37 const bool DEBUG_FLAG =
false;
38 const QStringList NO_LOAD_STARTUP_FILES;
39 const QStringList NO_COMMAND_LINE;
41 initializeLogging (
"engauge_test",
46 NO_REGRESSION_OPEN_FILE,
52 NO_EXTRACT_IMAGE_ONLY,
53 NO_EXTRACT_IMAGE_EXTENSION,
54 NO_LOAD_STARTUP_FILES,
59 void TestZoomTransition::testInAtClosestEnum ()
62 ZoomFactor zoomFactorNew = zoomTransition.
zoomIn (ZOOM_16_TO_1,
68 QVERIFY (zoomFactorNew == ZOOM_16_TO_1);
71 void TestZoomTransition::testInBeforeClosestFromEnum ()
74 ZoomFactor zoomFactorNew = zoomTransition.
zoomIn (ZOOM_1_TO_1,
79 QVERIFY (zoomFactorNew == ZOOM_1_TO_1_CLOSER);
82 void TestZoomTransition::testInBeforeClosestFromFill ()
85 ZoomFactor zoomFactorNew = zoomTransition.
zoomIn (ZOOM_FILL,
90 QVERIFY (zoomFactorNew == ZOOM_2_TO_1);
93 void TestZoomTransition::testOutAtFarthestEnum ()
96 ZoomFactor zoomFactorNew = zoomTransition.
zoomOut (ZOOM_1_TO_16,
102 QVERIFY (zoomFactorNew == ZOOM_1_TO_16);
105 void TestZoomTransition::testOutBeforeFarthestFromEnum ()
108 ZoomFactor zoomFactorNew = zoomTransition.
zoomOut (ZOOM_1_TO_1,
113 QVERIFY (zoomFactorNew == ZOOM_1_TO_1_FARTHER);
116 void TestZoomTransition::testOutBeforeFarthestFromFill ()
119 ZoomFactor zoomFactorNew = zoomTransition.
zoomOut (ZOOM_FILL,
124 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...