Engauge Digitizer 2
Loading...
Searching...
No Matches
Public Slots | Public Member Functions | List of all members
TestGuidelines Class Reference

Unit test of guidelines. More...

#include <TestGuidelines.h>

Inheritance diagram for TestGuidelines:
Inheritance graph
Collaboration diagram for TestGuidelines:
Collaboration graph

Public Slots

void test00StartupWithoutTransformation ()
 
void test01AfterAddingTransformation ()
 
void test02AfterRemovingTransformation ()
 

Public Member Functions

 TestGuidelines (QObject *parent=0)
 Single constructor.
 

Detailed Description

Unit test of guidelines.

Since the QtTest framework automatically screams through the private slots of this class but we want mouse/command/signal events to happen at their own pace in the gui, we use a multi-step approach:

  1. Under initTestCase() we use run the actual tests. Each test gets two smaller steps:
    1. Run the 'TestPrepare' method which queues up command(s) in MainWindow command queue
    2. The 'Test' method gets called after the 'TestPrepare' method has done its magic. This stores the result from each test into a FIFO list
  2. Let QtTest framework call each private slot. Each private slot grabs the next result in the FIFO list This approach produces test output that is formatted just like 'normal' QtTest tests (pass/fail in green/red, with class and function names afterwards)

Definition at line 22 of file TestGuidelines.h.

Constructor & Destructor Documentation

◆ TestGuidelines()

TestGuidelines::TestGuidelines ( QObject * parent = 0)
explicit

Single constructor.

Definition at line 41 of file TestGuidelines.cpp.

41 :
42 QObject(parent),
43 m_mainWindow (nullptr)
44{
45}
const int INNER_RADIUS_MIN

Member Function Documentation

◆ test00StartupWithoutTransformation

void TestGuidelines::test00StartupWithoutTransformation ( )
slot

Definition at line 188 of file TestGuidelines.cpp.

189{
190 // Expected and got counts
192
193 m_results.push_back (compareExpectedAndGot (countsExpectedXT,
195
196 // Connect to next test here
197 test01AfterAddingTransformationPrepare ();
198}
@ NUM_GUIDELINE_STATES

◆ test01AfterAddingTransformation

void TestGuidelines::test01AfterAddingTransformation ( )
slot

Definition at line 227 of file TestGuidelines.cpp.

228{
229 // Expected and got counts
231
232 m_results.push_back (compareExpectedAndGot (countsExpectedXT,
234
235 // Connect to next test here
236 test02AfterRemovingTransformationPrepare ();
237}

◆ test02AfterRemovingTransformation

void TestGuidelines::test02AfterRemovingTransformation ( )
slot

Definition at line 294 of file TestGuidelines.cpp.

295{
296 // Expected and got counts
298
299 m_results.push_back (compareExpectedAndGot (countsExpectedXT,
301
302 // Connect to next test here
303 //test03... ();
304}

The documentation for this class was generated from the following files: