From 179fa413b047bede6e32109e2ce82437c5fb8d34 Mon Sep 17 00:00:00 2001 From: MenTaLguY Date: Mon, 16 Jan 2006 02:36:01 +0000 Subject: moving trunk for module inkscape (bzr r1) --- cxxtest/sample/gui/GreenYellowRed.h | 57 +++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 cxxtest/sample/gui/GreenYellowRed.h (limited to 'cxxtest/sample/gui') diff --git a/cxxtest/sample/gui/GreenYellowRed.h b/cxxtest/sample/gui/GreenYellowRed.h new file mode 100644 index 000000000..446b23345 --- /dev/null +++ b/cxxtest/sample/gui/GreenYellowRed.h @@ -0,0 +1,57 @@ +#include + +#ifdef _WIN32 +# include +# define CXXTEST_SAMPLE_GUI_WAIT() Sleep( 1000 ) +#else // !_WIN32 + extern "C" unsigned sleep( unsigned seconds ); +# define CXXTEST_SAMPLE_GUI_WAIT() sleep( 1 ) +#endif // _WIN32 + +class GreenYellowRed : public CxxTest::TestSuite +{ +public: + void wait() + { + CXXTEST_SAMPLE_GUI_WAIT(); + } + + void test_Start_green() + { + wait(); + } + + void test_Green_again() + { + TS_TRACE( "Still green" ); + wait(); + } + + void test_Now_yellow() + { + TS_WARN( "Yellow" ); + wait(); + } + + void test_Cannot_go_back() + { + wait(); + } + + void test_Finally_red() + { + TS_FAIL( "Red" ); + wait(); + } + + void test_Cannot_go_back_to_yellow() + { + TS_WARN( "Yellow?" ); + wait(); + } + + void test_Cannot_go_back_to_green() + { + wait(); + } +}; -- cgit v1.2.3