comparison test/automated/testsdl.c @ 3749:1e277c40babe gsoc2009_unit_tests

Added placeholder for manual tests.
author Edgar Simo <bobbens@gmail.com>
date Tue, 04 Aug 2009 18:07:11 +0000
parents f0b89cf4bffc
children cb75359d29bb
comparison
equal deleted inserted replaced
3748:9428ae743878 3749:1e277c40babe
22 22
23 23
24 /* 24 /*
25 * Tests to run. 25 * Tests to run.
26 */ 26 */
27 static int run_platform = 1; 27 static int run_manual = 0; /**< Run manual tests. */
28 static int run_rwops = 1; 28 /* Manual. */
29 static int run_surface = 1; 29 /* Automatic. */
30 static int run_render = 1; 30 static int run_platform = 1; /**< Run platform tests. */
31 static int run_rwops = 1; /**< Run RWops tests. */
32 static int run_surface = 1; /**< Run surface tests. */
33 static int run_render = 1; /**< Run render tests. */
31 34
32 /* 35 /*
33 * Prototypes. 36 * Prototypes.
34 */ 37 */
35 static void print_usage( const char *name ); 38 static void print_usage( const char *name );
41 */ 44 */
42 static void print_usage( const char *name ) 45 static void print_usage( const char *name )
43 { 46 {
44 printf("Usage: %s [OPTIONS]\n", name); 47 printf("Usage: %s [OPTIONS]\n", name);
45 printf("Options are:\n"); 48 printf("Options are:\n");
49 printf(" --manual enables tests that require user interaction\n");
46 printf(" --noplatform do not run the platform tests\n"); 50 printf(" --noplatform do not run the platform tests\n");
47 printf(" --norwops do not run the rwops tests\n"); 51 printf(" --norwops do not run the rwops tests\n");
48 printf(" --nosurface do not run the surface tests\n"); 52 printf(" --nosurface do not run the surface tests\n");
49 printf(" --norender do not run the render tests\n"); 53 printf(" --norender do not run the render tests\n");
50 printf(" -v, --verbose increases verbosity level by 1 for each -v\n"); 54 printf(" -v, --verbose increases verbosity level by 1 for each -v\n");
57 * @brief Handles the options. 61 * @brief Handles the options.
58 */ 62 */
59 static void parse_options( int argc, char *argv[] ) 63 static void parse_options( int argc, char *argv[] )
60 { 64 {
61 static struct option long_options[] = { 65 static struct option long_options[] = {
66 { "manual", no_argument, 0, 0 },
62 { "noplatform", no_argument, 0, 0 }, 67 { "noplatform", no_argument, 0, 0 },
63 { "norwops", no_argument, 0, 0 }, 68 { "norwops", no_argument, 0, 0 },
64 { "nosurface", no_argument, 0, 0 }, 69 { "nosurface", no_argument, 0, 0 },
65 { "norender", no_argument, 0, 0 }, 70 { "norender", no_argument, 0, 0 },
66 { "verbose", no_argument, 0, 'v' }, 71 { "verbose", no_argument, 0, 'v' },
119 */ 124 */
120 int main( int argc, char *argv[] ) 125 int main( int argc, char *argv[] )
121 { 126 {
122 parse_options( argc, argv ); 127 parse_options( argc, argv );
123 128
129 /* Automatic tests. */
124 if (run_platform) 130 if (run_platform)
125 test_platform(); 131 test_platform();
126 if (run_rwops) 132 if (run_rwops)
127 test_rwops(); 133 test_rwops();
128 if (run_surface) 134 if (run_surface)
129 test_surface(); 135 test_surface();
130 if (run_render) 136 if (run_render)
131 test_render(); 137 test_render();
132 138
139 /* Manual tests. */
140 if (run_manual) {
141 }
142
133 return 0; 143 return 0;
134 } 144 }
135 145