Added placeholder for manual tests. gsoc2009_unit_tests
authorEdgar Simo <bobbens@gmail.com>
Tue, 04 Aug 2009 18:07:11 +0000
branchgsoc2009_unit_tests
changeset 37491e277c40babe
parent 3748 9428ae743878
child 3750 cb75359d29bb
Added placeholder for manual tests.
test/automated/testsdl.c
     1.1 --- a/test/automated/testsdl.c	Tue Aug 04 17:53:20 2009 +0000
     1.2 +++ b/test/automated/testsdl.c	Tue Aug 04 18:07:11 2009 +0000
     1.3 @@ -24,10 +24,13 @@
     1.4  /*
     1.5   * Tests to run.
     1.6   */
     1.7 -static int run_platform    = 1;
     1.8 -static int run_rwops       = 1;
     1.9 -static int run_surface     = 1;
    1.10 -static int run_render      = 1;
    1.11 +static int run_manual      = 0; /**< Run manual tests. */
    1.12 +/* Manual. */
    1.13 +/* Automatic. */
    1.14 +static int run_platform    = 1; /**< Run platform tests. */
    1.15 +static int run_rwops       = 1; /**< Run RWops tests. */
    1.16 +static int run_surface     = 1; /**< Run surface tests. */
    1.17 +static int run_render      = 1; /**< Run render tests. */
    1.18  
    1.19  /*
    1.20   * Prototypes.
    1.21 @@ -43,6 +46,7 @@
    1.22  {
    1.23     printf("Usage: %s [OPTIONS]\n", name);
    1.24     printf("Options are:\n");
    1.25 +   printf("   --manual        enables tests that require user interaction\n");
    1.26     printf("   --noplatform    do not run the platform tests\n");
    1.27     printf("   --norwops       do not run the rwops tests\n");
    1.28     printf("   --nosurface     do not run the surface tests\n");
    1.29 @@ -59,6 +63,7 @@
    1.30  static void parse_options( int argc, char *argv[] )
    1.31  {
    1.32     static struct option long_options[] = {
    1.33 +      { "manual", no_argument, 0, 0 },
    1.34        { "noplatform", no_argument, 0, 0 },
    1.35        { "norwops", no_argument, 0, 0 },
    1.36        { "nosurface", no_argument, 0, 0 },
    1.37 @@ -121,6 +126,7 @@
    1.38  {
    1.39     parse_options( argc, argv );
    1.40  
    1.41 +   /* Automatic tests. */
    1.42     if (run_platform)
    1.43        test_platform();
    1.44     if (run_rwops)
    1.45 @@ -130,6 +136,10 @@
    1.46     if (run_render)
    1.47        test_render();
    1.48  
    1.49 +   /* Manual tests. */
    1.50 +   if (run_manual) {
    1.51 +   }
    1.52 +
    1.53     return 0;
    1.54  }
    1.55