My Project
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Types | Private Attributes
CxxTest::GuiListener Class Reference

#include <Gui.h>

Public Member Functions

 GuiListener ()
 
virtual ~GuiListener ()
 
virtual void runGui (int &argc, char **argv, TestListener &listener)
 
virtual void enterGui (int &, char **)
 
virtual void leaveGui ()
 
virtual void guiEnterWorld (unsigned)
 
virtual void guiEnterSuite (const char *)
 
virtual void guiEnterTest (const char *, const char *)
 
virtual void yellowBar ()
 
virtual void redBar ()
 
void enterWorld (const WorldDescription &d)
 
void enterSuite (const SuiteDescription &d)
 
void enterTest (const TestDescription &d)
 
void leaveTest (const TestDescription &)
 
void leaveSuite (const SuiteDescription &)
 
void leaveWorld (const WorldDescription &)
 
void warning (const char *, unsigned, const char *)
 
void failedTest (const char *, unsigned, const char *)
 
void failedAssert (const char *, unsigned, const char *)
 
void failedAssertEquals (const char *, unsigned, const char *, const char *, const char *, const char *)
 
void failedAssertSameData (const char *, unsigned, const char *, const char *, const char *, const void *, const void *, unsigned)
 
void failedAssertDelta (const char *, unsigned, const char *, const char *, const char *, const char *, const char *, const char *)
 
void failedAssertDiffers (const char *, unsigned, const char *, const char *, const char *)
 
void failedAssertLessThan (const char *, unsigned, const char *, const char *, const char *, const char *)
 
void failedAssertLessThanEquals (const char *, unsigned, const char *, const char *, const char *, const char *)
 
void failedAssertPredicate (const char *, unsigned, const char *, const char *, const char *)
 
void failedAssertRelation (const char *, unsigned, const char *, const char *, const char *, const char *, const char *)
 
void failedAssertThrows (const char *, unsigned, const char *, const char *, bool)
 
void failedAssertThrowsNot (const char *, unsigned, const char *)
 
- Public Member Functions inherited from CxxTest::TestListener
 TestListener ()
 
virtual ~TestListener ()
 
virtual void enterWorld (const WorldDescription &)
 
virtual void enterSuite (const SuiteDescription &)
 
virtual void enterTest (const TestDescription &)
 
virtual void trace (const char *, unsigned, const char *)
 
virtual void warning (const char *, unsigned, const char *)
 
virtual void failedTest (const char *, unsigned, const char *)
 
virtual void failedAssert (const char *, unsigned, const char *)
 
virtual void failedAssertEquals (const char *, unsigned, const char *, const char *, const char *, const char *)
 
virtual void failedAssertSameData (const char *, unsigned, const char *, const char *, const char *, const void *, const void *, unsigned)
 
virtual void failedAssertDelta (const char *, unsigned, const char *, const char *, const char *, const char *, const char *, const char *)
 
virtual void failedAssertDiffers (const char *, unsigned, const char *, const char *, const char *)
 
virtual void failedAssertLessThan (const char *, unsigned, const char *, const char *, const char *, const char *)
 
virtual void failedAssertLessThanEquals (const char *, unsigned, const char *, const char *, const char *, const char *)
 
virtual void failedAssertPredicate (const char *, unsigned, const char *, const char *, const char *)
 
virtual void failedAssertRelation (const char *, unsigned, const char *, const char *, const char *, const char *, const char *)
 
virtual void failedAssertThrows (const char *, unsigned, const char *, const char *, bool)
 
virtual void failedAssertThrowsNot (const char *, unsigned, const char *)
 
virtual void leaveTest (const TestDescription &)
 
virtual void leaveSuite (const SuiteDescription &)
 
virtual void leaveWorld (const WorldDescription &)
 

Protected Member Functions

void yellowBarSafe ()
 
void redBarSafe ()
 

Private Types

enum  { GREEN_BAR , YELLOW_BAR , RED_BAR }
 

Private Attributes

enum CxxTest::GuiListener:: { ... }  _state
 

Detailed Description

Definition at line 13 of file Gui.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
GREEN_BAR 
YELLOW_BAR 
RED_BAR 

Definition at line 150 of file Gui.h.

enum CxxTest::GuiListener::@8 _state

Constructor & Destructor Documentation

◆ GuiListener()

CxxTest::GuiListener::GuiListener ( )
inline

Definition at line 16 of file Gui.h.

16: _state( GREEN_BAR ) {}

◆ ~GuiListener()

virtual CxxTest::GuiListener::~GuiListener ( )
inlinevirtual

Definition at line 17 of file Gui.h.

17{}

Member Function Documentation

◆ enterGui()

virtual void CxxTest::GuiListener::enterGui ( int &  ,
char **   
)
inlinevirtual

Reimplemented in CxxTest::QtGui, CxxTest::Win32Gui, and CxxTest::X11Gui.

Definition at line 26 of file Gui.h.

26{}

◆ enterSuite()

void CxxTest::GuiListener::enterSuite ( const SuiteDescription d)
inlinevirtual

Reimplemented from CxxTest::TestListener.

Definition at line 42 of file Gui.h.

42{ guiEnterSuite( d.suiteName() ); }
virtual void guiEnterSuite(const char *)
Definition: Gui.h:33

◆ enterTest()

void CxxTest::GuiListener::enterTest ( const TestDescription d)
inlinevirtual

Reimplemented from CxxTest::TestListener.

Definition at line 43 of file Gui.h.

43{ guiEnterTest( d.suiteName(), d.testName() ); }
virtual void guiEnterTest(const char *, const char *)
Definition: Gui.h:34

◆ enterWorld()

void CxxTest::GuiListener::enterWorld ( const WorldDescription d)
inlinevirtual

Reimplemented from CxxTest::TestListener.

Reimplemented in CxxTest::QtGui, CxxTest::Win32Gui, and CxxTest::X11Gui.

Definition at line 41 of file Gui.h.

41{ guiEnterWorld( d.numTotalTests() ); }
virtual void guiEnterWorld(unsigned)
Definition: Gui.h:32

◆ failedAssert()

void CxxTest::GuiListener::failedAssert ( const char *  ,
unsigned  ,
const char *   
)
inlinevirtual

Reimplemented from CxxTest::TestListener.

Definition at line 58 of file Gui.h.

59 {
60 redBarSafe();
61 }
void redBarSafe()
Definition: Gui.h:141

◆ failedAssertDelta()

void CxxTest::GuiListener::failedAssertDelta ( const char *  ,
unsigned  ,
const char *  ,
const char *  ,
const char *  ,
const char *  ,
const char *  ,
const char *   
)
inlinevirtual

Reimplemented from CxxTest::TestListener.

Definition at line 78 of file Gui.h.

81 {
82 redBarSafe();
83 }

◆ failedAssertDiffers()

void CxxTest::GuiListener::failedAssertDiffers ( const char *  ,
unsigned  ,
const char *  ,
const char *  ,
const char *   
)
inlinevirtual

Reimplemented from CxxTest::TestListener.

Definition at line 85 of file Gui.h.

88 {
89 redBarSafe();
90 }

◆ failedAssertEquals()

void CxxTest::GuiListener::failedAssertEquals ( const char *  ,
unsigned  ,
const char *  ,
const char *  ,
const char *  ,
const char *   
)
inlinevirtual

Reimplemented from CxxTest::TestListener.

Definition at line 63 of file Gui.h.

66 {
67 redBarSafe();
68 }

◆ failedAssertLessThan()

void CxxTest::GuiListener::failedAssertLessThan ( const char *  ,
unsigned  ,
const char *  ,
const char *  ,
const char *  ,
const char *   
)
inlinevirtual

Reimplemented from CxxTest::TestListener.

Definition at line 92 of file Gui.h.

95 {
96 redBarSafe();
97 }

◆ failedAssertLessThanEquals()

void CxxTest::GuiListener::failedAssertLessThanEquals ( const char *  ,
unsigned  ,
const char *  ,
const char *  ,
const char *  ,
const char *   
)
inlinevirtual

Reimplemented from CxxTest::TestListener.

Definition at line 99 of file Gui.h.

102 {
103 redBarSafe();
104 }

◆ failedAssertPredicate()

void CxxTest::GuiListener::failedAssertPredicate ( const char *  ,
unsigned  ,
const char *  ,
const char *  ,
const char *   
)
inlinevirtual

Reimplemented from CxxTest::TestListener.

Definition at line 106 of file Gui.h.

108 {
109 redBarSafe();
110 }

◆ failedAssertRelation()

void CxxTest::GuiListener::failedAssertRelation ( const char *  ,
unsigned  ,
const char *  ,
const char *  ,
const char *  ,
const char *  ,
const char *   
)
inlinevirtual

Reimplemented from CxxTest::TestListener.

Definition at line 112 of file Gui.h.

115 {
116 redBarSafe();
117 }

◆ failedAssertSameData()

void CxxTest::GuiListener::failedAssertSameData ( const char *  ,
unsigned  ,
const char *  ,
const char *  ,
const char *  ,
const void *  ,
const void *  ,
unsigned   
)
inlinevirtual

Reimplemented from CxxTest::TestListener.

Definition at line 70 of file Gui.h.

74 {
75 redBarSafe();
76 }

◆ failedAssertThrows()

void CxxTest::GuiListener::failedAssertThrows ( const char *  ,
unsigned  ,
const char *  ,
const char *  ,
bool   
)
inlinevirtual

Reimplemented from CxxTest::TestListener.

Definition at line 119 of file Gui.h.

122 {
123 redBarSafe();
124 }

◆ failedAssertThrowsNot()

void CxxTest::GuiListener::failedAssertThrowsNot ( const char *  ,
unsigned  ,
const char *   
)
inlinevirtual

Reimplemented from CxxTest::TestListener.

Definition at line 126 of file Gui.h.

128 {
129 redBarSafe();
130 }

◆ failedTest()

void CxxTest::GuiListener::failedTest ( const char *  ,
unsigned  ,
const char *   
)
inlinevirtual

Reimplemented from CxxTest::TestListener.

Definition at line 53 of file Gui.h.

54 {
55 redBarSafe();
56 }

◆ guiEnterSuite()

virtual void CxxTest::GuiListener::guiEnterSuite ( const char *  )
inlinevirtual

Reimplemented in CxxTest::QtGui, and CxxTest::Win32Gui.

Definition at line 33 of file Gui.h.

33{}

◆ guiEnterTest()

virtual void CxxTest::GuiListener::guiEnterTest ( const char *  ,
const char *   
)
inlinevirtual

Reimplemented in CxxTest::QtGui, CxxTest::Win32Gui, and CxxTest::X11Gui.

Definition at line 34 of file Gui.h.

34{}

◆ guiEnterWorld()

virtual void CxxTest::GuiListener::guiEnterWorld ( unsigned  )
inlinevirtual

Definition at line 32 of file Gui.h.

32{}

◆ leaveGui()

virtual void CxxTest::GuiListener::leaveGui ( )
inlinevirtual

Reimplemented in CxxTest::QtGui, CxxTest::Win32Gui, and CxxTest::X11Gui.

Definition at line 27 of file Gui.h.

27{}

◆ leaveSuite()

void CxxTest::GuiListener::leaveSuite ( const SuiteDescription )
inlinevirtual

Reimplemented from CxxTest::TestListener.

Definition at line 45 of file Gui.h.

45{}

◆ leaveTest()

void CxxTest::GuiListener::leaveTest ( const TestDescription )
inlinevirtual

Reimplemented from CxxTest::TestListener.

Definition at line 44 of file Gui.h.

44{}

◆ leaveWorld()

void CxxTest::GuiListener::leaveWorld ( const WorldDescription )
inlinevirtual

Reimplemented from CxxTest::TestListener.

Definition at line 46 of file Gui.h.

46{}

◆ redBar()

virtual void CxxTest::GuiListener::redBar ( )
inlinevirtual

Reimplemented in CxxTest::QtGui, CxxTest::Win32Gui, and CxxTest::X11Gui.

Definition at line 36 of file Gui.h.

36{}

◆ redBarSafe()

void CxxTest::GuiListener::redBarSafe ( )
inlineprotected

Definition at line 141 of file Gui.h.

142 {
143 if ( _state < RED_BAR ) {
144 redBar();
145 _state = RED_BAR;
146 }
147 }
virtual void redBar()
Definition: Gui.h:36

◆ runGui()

virtual void CxxTest::GuiListener::runGui ( int &  argc,
char **  argv,
TestListener listener 
)
inlinevirtual

Definition at line 19 of file Gui.h.

20 {
21 enterGui( argc, argv );
22 TestRunner::runAllTests( listener );
23 leaveGui();
24 }
virtual void enterGui(int &, char **)
Definition: Gui.h:26
virtual void leaveGui()
Definition: Gui.h:27
static void runAllTests(TestListener &listener)
Definition: TestRunner.h:20

◆ warning()

void CxxTest::GuiListener::warning ( const char *  ,
unsigned  ,
const char *   
)
inlinevirtual

Reimplemented from CxxTest::TestListener.

Definition at line 48 of file Gui.h.

49 {
51 }
void yellowBarSafe()
Definition: Gui.h:133

◆ yellowBar()

virtual void CxxTest::GuiListener::yellowBar ( )
inlinevirtual

Reimplemented in CxxTest::QtGui, CxxTest::Win32Gui, and CxxTest::X11Gui.

Definition at line 35 of file Gui.h.

35{}

◆ yellowBarSafe()

void CxxTest::GuiListener::yellowBarSafe ( )
inlineprotected

Definition at line 133 of file Gui.h.

134 {
135 if ( _state < YELLOW_BAR ) {
136 yellowBar();
138 }
139 }
virtual void yellowBar()
Definition: Gui.h:35

Field Documentation

◆ 

enum { ... } CxxTest::GuiListener::_state

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