diff options
| author | Max Horn | 2006-03-29 10:25:48 +0000 |
|---|---|---|
| committer | Max Horn | 2006-03-29 10:25:48 +0000 |
| commit | 3820593bb8dfdca4e2e17c70b278065b7f7894d9 (patch) | |
| tree | df3e8bebda3abcd99d0882dc9e8c6410f86850fb /test/cxxtest/sample/gui | |
| parent | 9c94670e22cb68e32fd38c0d2b009539e35d4a71 (diff) | |
| download | scummvm-rg350-3820593bb8dfdca4e2e17c70b278065b7f7894d9.tar.gz scummvm-rg350-3820593bb8dfdca4e2e17c70b278065b7f7894d9.tar.bz2 scummvm-rg350-3820593bb8dfdca4e2e17c70b278065b7f7894d9.zip | |
bringing cxxtest-3.10.1 to ScummVM's main branch
svn-id: r21488
Diffstat (limited to 'test/cxxtest/sample/gui')
| -rw-r--r-- | test/cxxtest/sample/gui/GreenYellowRed.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/test/cxxtest/sample/gui/GreenYellowRed.h b/test/cxxtest/sample/gui/GreenYellowRed.h new file mode 100644 index 0000000000..446b23345f --- /dev/null +++ b/test/cxxtest/sample/gui/GreenYellowRed.h @@ -0,0 +1,57 @@ +#include <cxxtest/TestSuite.h> + +#ifdef _WIN32 +# include <windows.h> +# 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(); + } +}; |
