annotate test/automated/testsdl.c @ 3753:5b48a529fd8a gsoc2009_unit_tests

More debugging information when test fails.
author Edgar Simo <bobbens@gmail.com>
date Thu, 06 Aug 2009 08:39:42 +0000
parents cb75359d29bb
children 427f059bc814
rev   line source
3740
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
1 /*
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
2 * SDL test suite framework code.
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
3 *
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
4 * Written by Edgar Simo "bobbens"
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
5 *
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
6 * Released under Public Domain.
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
7 */
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
8
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
9
3753
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
10 #include "SDL.h"
3741
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
11 #include "SDL_at.h"
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
12
3740
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
13 #include "platform/platform.h"
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
14 #include "rwops/rwops.h"
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
15 #include "surface/surface.h"
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
16 #include "render/render.h"
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
17
3741
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
18 #include <stdio.h> /* printf */
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
19 #include <stdlib.h> /* exit */
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
20 #include <unistd.h> /* getopt */
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
21 #include <getopt.h> /* getopt_long */
3745
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
22 #include <string.h> /* strcmp */
3740
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
23
3741
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
24
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
25 /*
3745
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
26 * Tests to run.
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
27 */
3749
1e277c40babe Added placeholder for manual tests.
Edgar Simo <bobbens@gmail.com>
parents: 3745
diff changeset
28 static int run_manual = 0; /**< Run manual tests. */
1e277c40babe Added placeholder for manual tests.
Edgar Simo <bobbens@gmail.com>
parents: 3745
diff changeset
29 /* Manual. */
1e277c40babe Added placeholder for manual tests.
Edgar Simo <bobbens@gmail.com>
parents: 3745
diff changeset
30 /* Automatic. */
1e277c40babe Added placeholder for manual tests.
Edgar Simo <bobbens@gmail.com>
parents: 3745
diff changeset
31 static int run_platform = 1; /**< Run platform tests. */
1e277c40babe Added placeholder for manual tests.
Edgar Simo <bobbens@gmail.com>
parents: 3745
diff changeset
32 static int run_rwops = 1; /**< Run RWops tests. */
1e277c40babe Added placeholder for manual tests.
Edgar Simo <bobbens@gmail.com>
parents: 3745
diff changeset
33 static int run_surface = 1; /**< Run surface tests. */
1e277c40babe Added placeholder for manual tests.
Edgar Simo <bobbens@gmail.com>
parents: 3745
diff changeset
34 static int run_render = 1; /**< Run render tests. */
3745
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
35
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
36 /*
3741
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
37 * Prototypes.
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
38 */
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
39 static void print_usage( const char *name );
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
40 static void parse_options( int argc, char *argv[] );
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
41
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
42
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
43 /**
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
44 * @brief Displays program usage.
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
45 */
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
46 static void print_usage( const char *name )
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
47 {
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
48 printf("Usage: %s [OPTIONS]\n", name);
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
49 printf("Options are:\n");
3750
cb75359d29bb Missed a few things in the last patch.
Edgar Simo <bobbens@gmail.com>
parents: 3749
diff changeset
50 printf(" -m, --manual enables tests that require user interaction\n");
3745
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
51 printf(" --noplatform do not run the platform tests\n");
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
52 printf(" --norwops do not run the rwops tests\n");
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
53 printf(" --nosurface do not run the surface tests\n");
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
54 printf(" --norender do not run the render tests\n");
3741
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
55 printf(" -v, --verbose increases verbosity level by 1 for each -v\n");
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
56 printf(" -q, --quiet only displays errors\n");
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
57 printf(" -h, --help display this message and exit\n");
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
58 }
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
59
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
60
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
61 /**
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
62 * @brief Handles the options.
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
63 */
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
64 static void parse_options( int argc, char *argv[] )
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
65 {
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
66 static struct option long_options[] = {
3750
cb75359d29bb Missed a few things in the last patch.
Edgar Simo <bobbens@gmail.com>
parents: 3749
diff changeset
67 { "manual", no_argument, 0, 'm' },
3745
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
68 { "noplatform", no_argument, 0, 0 },
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
69 { "norwops", no_argument, 0, 0 },
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
70 { "nosurface", no_argument, 0, 0 },
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
71 { "norender", no_argument, 0, 0 },
3741
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
72 { "verbose", no_argument, 0, 'v' },
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
73 { "quiet", no_argument, 0, 'q' },
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
74 { "help", no_argument, 0, 'h' },
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
75 {NULL,0,0,0}
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
76 };
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
77 int option_index = 0;
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
78 int c = 0;
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
79 int i;
3745
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
80 const char *str;
3741
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
81
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
82 /* Iterate over options. */
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
83 while ((c = getopt_long( argc, argv,
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
84 "vqh",
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
85 long_options, &option_index)) != -1) {
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
86
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
87 /* Handle options. */
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
88 switch (c) {
3745
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
89 case 0:
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
90 str = long_options[option_index].name;
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
91 if (strcmp(str,"noplatform")==0)
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
92 run_platform = 0;
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
93 else if (strcmp(str,"norwops")==0)
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
94 run_rwops = 0;
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
95 else if (strcmp(str,"nosurface")==0)
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
96 run_surface = 0;
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
97 else if (strcmp(str,"norender")==0)
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
98 run_render = 0;
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
99 break;
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
100
3750
cb75359d29bb Missed a few things in the last patch.
Edgar Simo <bobbens@gmail.com>
parents: 3749
diff changeset
101 /* Manual. */
cb75359d29bb Missed a few things in the last patch.
Edgar Simo <bobbens@gmail.com>
parents: 3749
diff changeset
102 case 'm':
cb75359d29bb Missed a few things in the last patch.
Edgar Simo <bobbens@gmail.com>
parents: 3749
diff changeset
103 run_manual = 1;
cb75359d29bb Missed a few things in the last patch.
Edgar Simo <bobbens@gmail.com>
parents: 3749
diff changeset
104 break;
3741
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
105
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
106 /* Verbosity. */
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
107 case 'v':
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
108 SDL_ATgeti( SDL_AT_VERBOSE, &i );
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
109 SDL_ATseti( SDL_AT_VERBOSE, i+1 );
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
110 break;
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
111
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
112 /* Quiet. */
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
113 case 'q':
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
114 SDL_ATseti( SDL_AT_QUIET, 1 );
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
115 break;
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
116
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
117 /* Help. */
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
118 case 'h':
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
119 print_usage( argv[0] );
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
120 exit(EXIT_SUCCESS);
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
121 }
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
122 }
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
123
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
124 }
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
125
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
126
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
127 /**
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
128 * @brief Main entry point.
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
129 */
3740
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
130 int main( int argc, char *argv[] )
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
131 {
3753
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
132 int failed;
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
133 int rev;
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
134 SDL_version ver;
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
135
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
136 /* Get options. */
3741
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
137 parse_options( argc, argv );
3740
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
138
3753
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
139 /* Defaults. */
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
140 failed = 0;
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
141
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
142 /* Print some text if verbose. */
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
143 SDL_GetVersion( &ver );
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
144 rev = SDL_GetRevision();
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
145 SDL_ATprintVerbose( 1, "Running tests with SDL %d.%d.%d revision %d\n",
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
146 ver.major, ver.minor, ver.patch, rev );
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
147
3749
1e277c40babe Added placeholder for manual tests.
Edgar Simo <bobbens@gmail.com>
parents: 3745
diff changeset
148 /* Automatic tests. */
3745
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
149 if (run_platform)
3753
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
150 failed += test_platform();
3745
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
151 if (run_rwops)
3753
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
152 failed += test_rwops();
3745
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
153 if (run_surface)
3753
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
154 failed += test_surface();
3745
f0b89cf4bffc You can now disable any of the testsuites.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
155 if (run_render)
3753
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
156 failed += test_render();
3740
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
157
3749
1e277c40babe Added placeholder for manual tests.
Edgar Simo <bobbens@gmail.com>
parents: 3745
diff changeset
158 /* Manual tests. */
1e277c40babe Added placeholder for manual tests.
Edgar Simo <bobbens@gmail.com>
parents: 3745
diff changeset
159 if (run_manual) {
1e277c40babe Added placeholder for manual tests.
Edgar Simo <bobbens@gmail.com>
parents: 3745
diff changeset
160 }
1e277c40babe Added placeholder for manual tests.
Edgar Simo <bobbens@gmail.com>
parents: 3745
diff changeset
161
3753
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
162 /* Display more information if failed. */
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
163 if (failed > 0) {
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
164 SDL_ATprintErr( "Tests run with SDL %d.%d.%d revision %d\n",
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
165 ver.major, ver.minor, ver.patch, rev );
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
166 SDL_ATprintErr( "System is running %s and is %s endian\n",
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
167 platform_getPlatform(),
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
168 #ifdef SDL_LIL_ENDIAN
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
169 "little"
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
170 #else
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
171 "big"
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
172 #endif
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
173 );
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
174 }
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
175
5b48a529fd8a More debugging information when test fails.
Edgar Simo <bobbens@gmail.com>
parents: 3750
diff changeset
176 return failed;
3740
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
177 }
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
178