Engauge Digitizer 2
Loading...
Searching...
No Matches
TestGuidelines.h
Go to the documentation of this file.
1#ifndef TEST_GUIDELINES_H
2#define TEST_GUIDELINES_H
3
4#include "GuidelineState.h"
5#include <QObject>
6#include <QString>
7#include <QTimer>
8
9class MainWindow;
10
22class TestGuidelines : public QObject
23{
24 Q_OBJECT
25public:
27 explicit TestGuidelines(QObject *parent = 0);
28
29public slots:
30 // These would be private slots but we want to control when they are called so
31 // these are moved outside of the private slots (which qttest automatically calls).
32 // Number of methods here must agree with NUMBER_TESTS
36
37private slots:
38
39 void cleanupTestCase ();
40 void initTestCase ();
41
42 // Number of tests (with one private slot per test) must equal NUMBER_TESTS
43 void test00StartupWithoutTransformationReport ();
44 void test01AfterAddingTransformationReport ();
45 void test02AfterRemovingTransformationReport ();
46
47private:
48
50 class Result
51 {
52 public:
54 Result (bool pass,
55 const QString &problem);
56
58 bool pass () const;
59
61 QString problem () const;
62
63 private:
64 Result ();
65
66 bool m_pass;
67 QString m_problem;
68 };
69
71 typedef QList<Result> Results;
72
73 Result compareExpectedAndGot (const QVector<int> &countsExpectedXT,
74 const QVector<int> &countsExpectedYR);
75 GuidelineState guidelineStateFromString (const QString &string) const;
76
77 // Number of methods here must agree with NUMBER_TESTS
78 void test00StartupWithoutTransformationPrepare ();
79 void test01AfterAddingTransformationPrepare ();
80 void test02AfterRemovingTransformationPrepare ();
81
82 void turnOffChecklist ();
83
84 MainWindow *m_mainWindow;
85 QTimer m_showTimer;
86 Results m_results;
87};
88
89#endif // TEST_GUIDELINES_H
GuidelineState
Set of possible Guideline states. See class Guideline for more information.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition MainWindow.h:95
void test02AfterRemovingTransformation()
void test01AfterAddingTransformation()
void test00StartupWithoutTransformation()
TestGuidelines(QObject *parent=0)
Single constructor.