Engauge Digitizer 2
Loading...
Searching...
No Matches
TestZoomTransition.cpp
Go to the documentation of this file.
1#include "Logger.h"
2#include "MainWindow.h"
3#include <QtTest/QtTest>
5#include "ZoomTransition.h"
6
8
9using namespace std;
10
11const bool FILL_CHECKED = true;
12const bool FILL_UNCHECKED = false;
13const double M11 = 1.9;
14const double M22 = 1.49;
15
20
21void TestZoomTransition::cleanupTestCase ()
22{
23
24}
25
26void TestZoomTransition::initTestCase ()
27{
28 const bool NO_DROP_REGRESSION = false;
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;
37 const bool DEBUG_FLAG = false;
40
41 initializeLogging ("engauge_test",
42 "engauge_test.log",
44
56 w.show ();
57}
58
59void TestZoomTransition::testInAtClosestEnum ()
60{
63 M11,
64 M22,
66
67 // Should be unchanged since cannot go further
69}
70
71void TestZoomTransition::testInBeforeClosestFromEnum ()
72{
75 M11,
76 M22,
78
80}
81
82void TestZoomTransition::testInBeforeClosestFromFill ()
83{
86 M11,
87 M22,
89
91}
92
93void TestZoomTransition::testOutAtFarthestEnum ()
94{
97 M11,
98 M22,
100
101 // Should be unchanged since cannot go further
103}
104
105void TestZoomTransition::testOutBeforeFarthestFromEnum ()
106{
109 M11,
110 M22,
112
114}
115
116void TestZoomTransition::testOutBeforeFarthestFromFill ()
117{
120 M11,
121 M22,
123
125}
const int INNER_RADIUS_MIN
void initializeLogging(const QString &name, const QString &filename, bool isDebug)
Definition Logger.cpp:21
const bool NO_EXPORT_ONLY
const QStringList NO_COMMAND_LINE
const QString NO_EXTRACT_IMAGE_EXTENSION
const QString NO_ERROR_REPORT_LOG_FILE
const bool NO_GNUPLOT_LOG_FILES
const QString NO_REGRESSION_OPEN_FILE
const QStringList NO_LOAD_STARTUP_FILES
const bool NO_REGRESSION_IMPORT
const bool NO_EXTRACT_IMAGE_ONLY
const bool NO_DROP_REGRESSION
const bool DEBUG_FLAG
const bool FILL_CHECKED
const bool FILL_UNCHECKED
const double M11
const double M22
ZoomFactor
Zoom factors ordered by zoom level so next one above/below is the next zoom level.
Definition ZoomFactor.h:11
@ ZOOM_1_TO_1_FARTHER
Definition ZoomFactor.h:25
@ ZOOM_2_TO_1
Definition ZoomFactor.h:21
@ ZOOM_FILL
Definition ZoomFactor.h:37
@ ZOOM_1_TO_1_CLOSER
Definition ZoomFactor.h:23
@ ZOOM_1_TO_1
Definition ZoomFactor.h:24
@ ZOOM_1_TO_16
Definition ZoomFactor.h:36
@ ZOOM_16_TO_1
Definition ZoomFactor.h:12
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition MainWindow.h:92
Unit test of ZoomTransition class.
TestZoomTransition(QObject *parent=0)
Single constructor.
Perform calculations to determine the next zoom setting given the current zoom setting,...
ZoomFactor zoomOut(ZoomFactor currentZoomFactor, double m11, double m22, bool actionZoomFillIsChecked) const
Zoom out.
ZoomFactor zoomIn(ZoomFactor currentZoomFactor, double m11, double m22, bool actionZoomFillIsChecked) const
Zoom in.