~laney/ubuntu/vivid/0ad/test

« back to all changes in this revision

Viewing changes to libraries/source/cxxtest-4.3/sample/gui/GreenYellowRed.h

  • Committer: Package Import Robot
  • Author(s): Vincent Cheng
  • Date: 2014-05-17 16:30:39 UTC
  • mfrom: (5.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20140517163039-whlz3xf64hbmi8x1
Tags: 0.0.16-1
* New upstream release.
  - Drop debian/patches/fix-kfreebsd-ftbfs.patch; applied upstream.
* Avoid repacking tarball by including missing jquery sources in Debian diff,
  see debian/missing-sources/jquery-1.8.{0,3}.js. Alternative way of fixing
  #735349.
  - Update debian/copyright to include missing license entries for the
    various javascript libraries contained in the source tarball.
  - Revert changes made to debian/control in 0ad/0.0.15+dfsg-3, i.e.:
    revert: debian/control: Hardcode versions of 0ad-data{,-common} to
            depend on to workaround the fact that 0.0.15+dfsg is strictly
            greater than 0.0.15.
* Build-dep on libgloox-dev (>= 1.0.9) to ensure that 0ad is built with
  newer enough gloox to avoid lobby connectivity issues.
* Add new build-deps: libicu-dev, libmozjs-24-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <cxxtest/TestSuite.h>
 
2
 
 
3
#ifdef _WIN32
 
4
#   include <windows.h>
 
5
#   define CXXTEST_SAMPLE_GUI_WAIT() Sleep( 1000 )
 
6
#else // !_WIN32
 
7
extern "C" unsigned sleep(unsigned seconds);
 
8
#   define CXXTEST_SAMPLE_GUI_WAIT() sleep( 1 )
 
9
#endif // _WIN32
 
10
 
 
11
class GreenYellowRed : public CxxTest::TestSuite
 
12
{
 
13
public:
 
14
    void wait()
 
15
    {
 
16
        CXXTEST_SAMPLE_GUI_WAIT();
 
17
    }
 
18
 
 
19
    void test_Start_green()
 
20
    {
 
21
        wait();
 
22
    }
 
23
 
 
24
    void test_Green_again()
 
25
    {
 
26
        TS_TRACE("Still green");
 
27
        wait();
 
28
    }
 
29
 
 
30
    void test_Now_yellow()
 
31
    {
 
32
        TS_WARN("Yellow");
 
33
        wait();
 
34
    }
 
35
 
 
36
    void test_Cannot_go_back()
 
37
    {
 
38
        wait();
 
39
    }
 
40
 
 
41
    void test_Finally_red()
 
42
    {
 
43
        TS_FAIL("Red");
 
44
        wait();
 
45
    }
 
46
 
 
47
    void test_Cannot_go_back_to_yellow()
 
48
    {
 
49
        TS_WARN("Yellow?");
 
50
        wait();
 
51
    }
 
52
 
 
53
    void test_Cannot_go_back_to_green()
 
54
    {
 
55
        wait();
 
56
    }
 
57
};