Mercurial > sdl-ios-xcode
annotate test/automated/rwops/rwops.c @ 3741:808fad5fb593 gsoc2009_unit_tests
Added command line options.
Added verbosity levels.
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Sun, 02 Aug 2009 18:58:03 +0000 |
parents | e451d5d288e9 |
children |
rev | line source |
---|---|
3713 | 1 /** |
2 * Automated SDL_RWops test. | |
3 * | |
4 * Written by Edgar Simo "bobbens" | |
5 * | |
6 * Released under Public Domain. | |
7 */ | |
8 | |
9 | |
10 #include "SDL.h" | |
11 #include "SDL_at.h" | |
12 | |
13 | |
3737
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
14 #define RWOPS_READ "rwops/read" |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
15 #define RWOPS_WRITE "rwops/write" |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
16 |
3713 | 17 static const char hello_world[] = "Hello World!"; |
18 | |
19 | |
20 /** | |
3737
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
21 * @brief Makes sure parameters work properly. |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
22 */ |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
23 static void rwops_testParam (void) |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
24 { |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
25 SDL_RWops *rwops; |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
26 |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
27 /* Begin testcase. */ |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
28 SDL_ATbegin( "RWops Parameters" ); |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
29 |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
30 /* These should all fail. */ |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
31 rwops = SDL_RWFromFile(NULL, NULL); |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
32 if (SDL_ATassert( "SDL_RWFromFile(NULL, NULL) worked", rwops == NULL )) |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
33 return; |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
34 rwops = SDL_RWFromFile(NULL, "ab+"); |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
35 if (SDL_ATassert( "SDL_RWFromFile(NULL, \"ab+\") worked", rwops == NULL )) |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
36 return; |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
37 rwops = SDL_RWFromFile(NULL, "sldfkjsldkfj"); |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
38 if (SDL_ATassert( "SDL_RWFromFile(NULL, \"sldfkjsldkfj\") worked", rwops == NULL )) |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
39 return; |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
40 rwops = SDL_RWFromFile("something", ""); |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
41 if (SDL_ATassert( "SDL_RWFromFile(\"something\", \"\") worked", rwops == NULL )) |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
42 return; |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
43 rwops = SDL_RWFromFile("something", NULL); |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
44 if (SDL_ATassert( "SDL_RWFromFile(\"something\", NULL) worked", rwops == NULL )) |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
45 return; |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
46 |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
47 |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
48 /* End testcase. */ |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
49 SDL_ATend(); |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
50 } |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
51 |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
52 |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
53 /** |
3713 | 54 * @brief Does a generic rwops test. |
55 * | |
56 * RWops should have "Hello World!" in it already if write is disabled. | |
57 * | |
58 * @param write Test writing also. | |
59 * @return 1 if an assert is failed. | |
60 */ | |
61 static int rwops_testGeneric( SDL_RWops *rw, int write ) | |
62 { | |
63 char buf[sizeof(hello_world)]; | |
64 int i; | |
65 | |
3737
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
66 /* Set to start. */ |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
67 i = SDL_RWseek( rw, 0, RW_SEEK_SET ); |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
68 if (SDL_ATvassert( i == 0, |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
69 "Seeking with SDL_RWseek (RW_SEEK_SET): got %d, expected %d", |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
70 i, 0 )) |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
71 return 1; |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
72 |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
73 /* Test write. */ |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
74 i = SDL_RWwrite( rw, hello_world, sizeof(hello_world)-1, 1 ); |
3713 | 75 if (write) { |
3737
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
76 if (SDL_ATassert( "Writing with SDL_RWwrite (failed to write)", i == 1 )) |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
77 return 1; |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
78 } |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
79 else { |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
80 if (SDL_ATassert( "Writing with SDL_RWwrite (wrote when shouldn't have)", i <= 0 )) |
3713 | 81 return 1; |
82 } | |
83 | |
84 /* Test seek. */ | |
85 i = SDL_RWseek( rw, 6, RW_SEEK_SET ); | |
3737
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
86 if (SDL_ATvassert( i == 6, |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
87 "Seeking with SDL_RWseek (RW_SEEK_SET): got %d, expected %d", |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
88 i, 0 )) |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
89 return 1; |
3713 | 90 |
91 /* Test seek. */ | |
92 i = SDL_RWseek( rw, 0, RW_SEEK_SET ); | |
3737
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
93 if (SDL_ATvassert( i == 0, |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
94 "Seeking with SDL_RWseek (RW_SEEK_SET): got %d, expected %d", |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
95 i, 0 )) |
3713 | 96 return 1; |
97 | |
98 /* Test read. */ | |
99 i = SDL_RWread( rw, buf, 1, sizeof(hello_world)-1 ); | |
100 if (SDL_ATassert( "Reading with SDL_RWread", i == sizeof(hello_world)-1 )) | |
101 return 1; | |
102 if (SDL_ATassert( "Memory read does not match memory written", | |
103 memcmp( buf, hello_world, sizeof(hello_world)-1 ) == 0 )) | |
104 return 1; | |
105 | |
3737
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
106 /* More seek tests. */ |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
107 i = SDL_RWseek( rw, -4, RW_SEEK_CUR ); |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
108 if (SDL_ATvassert( i == sizeof(hello_world)-5, |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
109 "Seeking with SDL_RWseek (RW_SEEK_CUR): got %d, expected %d", |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
110 i, sizeof(hello_world)-5 )) |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
111 return 1; |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
112 i = SDL_RWseek( rw, -1, RW_SEEK_END ); |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
113 if (SDL_ATvassert( i == sizeof(hello_world)-2, |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
114 "Seeking with SDL_RWseek (RW_SEEK_END): got %d, expected %d", |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
115 i, sizeof(hello_world)-2 )) |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
116 return 1; |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
117 |
3713 | 118 return 0; |
119 } | |
120 | |
121 | |
122 /** | |
123 * @brief Tests opening from memory. | |
124 */ | |
125 static void rwops_testMem (void) | |
126 { | |
127 char mem[sizeof(hello_world)]; | |
128 SDL_RWops *rw; | |
129 | |
130 /* Begin testcase. */ | |
131 SDL_ATbegin( "SDL_RWFromMem" ); | |
132 | |
133 /* Open. */ | |
3737
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
134 rw = SDL_RWFromMem( mem, sizeof(hello_world)-1 ); |
3713 | 135 if (SDL_ATassert( "Opening memory with SDL_RWFromMem", rw != NULL )) |
136 return; | |
137 | |
138 /* Run generic tests. */ | |
139 if (rwops_testGeneric( rw, 1 )) | |
140 return; | |
141 | |
142 /* Close. */ | |
143 SDL_FreeRW( rw ); | |
144 | |
145 /* End testcase. */ | |
146 SDL_ATend(); | |
147 } | |
148 | |
149 | |
150 static const char const_mem[] = "Hello World!"; | |
151 /** | |
152 * @brief Tests opening from memory. | |
153 */ | |
154 static void rwops_testConstMem (void) | |
155 { | |
156 SDL_RWops *rw; | |
157 | |
158 /* Begin testcase. */ | |
159 SDL_ATbegin( "SDL_RWFromConstMem" ); | |
160 | |
161 /* Open. */ | |
3737
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
162 rw = SDL_RWFromConstMem( const_mem, sizeof(const_mem)-1 ); |
3713 | 163 if (SDL_ATassert( "Opening memory with SDL_RWFromConstMem", rw != NULL )) |
164 return; | |
165 | |
166 /* Run generic tests. */ | |
167 if (rwops_testGeneric( rw, 0 )) | |
168 return; | |
169 | |
170 /* Close. */ | |
171 SDL_FreeRW( rw ); | |
172 | |
173 /* End testcase. */ | |
174 SDL_ATend(); | |
175 } | |
176 | |
177 | |
178 /** | |
179 * @brief Tests opening from memory. | |
180 */ | |
181 static void rwops_testFile (void) | |
182 { | |
183 SDL_RWops *rw; | |
184 | |
185 /* Begin testcase. */ | |
186 SDL_ATbegin( "SDL_RWFromFile" ); | |
187 | |
3737
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
188 /* Read test. */ |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
189 rw = SDL_RWFromFile( RWOPS_READ, "r" ); |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
190 if (SDL_ATassert( "Opening memory with SDL_RWFromFile '"RWOPS_READ"'", rw != NULL )) |
3713 | 191 return; |
192 if (rwops_testGeneric( rw, 0 )) | |
193 return; | |
3737
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
194 SDL_FreeRW( rw ); |
3713 | 195 |
3737
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
196 /* Write test. */ |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
197 rw = SDL_RWFromFile( RWOPS_WRITE, "w+" ); |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
198 if (SDL_ATassert( "Opening memory with SDL_RWFromFile '"RWOPS_WRITE"'", rw != NULL )) |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
199 return; |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
200 if (rwops_testGeneric( rw, 1 )) |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
201 return; |
3713 | 202 SDL_FreeRW( rw ); |
203 | |
204 /* End testcase. */ | |
205 SDL_ATend(); | |
206 } | |
207 | |
208 | |
209 /** | |
210 * @brief Tests opening from memory. | |
211 */ | |
212 static void rwops_testFP (void) | |
213 { | |
214 #ifdef HAVE_STDIO_H | |
215 FILE *fp; | |
216 SDL_RWops *rw; | |
217 | |
218 /* Begin testcase. */ | |
219 SDL_ATbegin( "SDL_RWFromFP" ); | |
220 | |
3737
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
221 /* Run read tests. */ |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
222 fp = fopen( RWOPS_READ, "r" ); |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
223 if (SDL_ATassert( "Failed to open file '"RWOPS_READ"'", fp != NULL)) |
3713 | 224 return; |
225 rw = SDL_RWFromFP( fp, 1 ); | |
226 if (SDL_ATassert( "Opening memory with SDL_RWFromFP", rw != NULL )) | |
227 return; | |
3737
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
228 if (rwops_testGeneric( rw, 0 )) |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
229 return; |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
230 SDL_FreeRW( rw ); |
3713 | 231 |
3737
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
232 /* Run write tests. */ |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
233 fp = fopen( RWOPS_WRITE, "w+" ); |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
234 if (SDL_ATassert( "Failed to open file '"RWOPS_WRITE"'", fp != NULL)) |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
235 return; |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
236 rw = SDL_RWFromFP( fp, 1 ); |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
237 if (SDL_ATassert( "Opening memory with SDL_RWFromFP", rw != NULL )) |
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
238 return; |
3713 | 239 if (rwops_testGeneric( rw, 1 )) |
240 return; | |
241 SDL_FreeRW( rw ); | |
242 | |
243 /* End testcase. */ | |
244 SDL_ATend(); | |
245 #endif /* HAVE_STDIO_H */ | |
246 } | |
247 | |
248 | |
249 /** | |
250 * @brief Entry point. | |
251 */ | |
3740
e451d5d288e9
Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
3737
diff
changeset
|
252 #ifdef TEST_STANDALONE |
3713 | 253 int main( int argc, const char *argv[] ) |
254 { | |
3722
d8772964e402
Added more strict warning flags.
Edgar Simo <bobbens@gmail.com>
parents:
3713
diff
changeset
|
255 (void) argc; |
d8772964e402
Added more strict warning flags.
Edgar Simo <bobbens@gmail.com>
parents:
3713
diff
changeset
|
256 (void) argv; |
3740
e451d5d288e9
Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
3737
diff
changeset
|
257 #else /* TEST_STANDALONE */ |
e451d5d288e9
Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
3737
diff
changeset
|
258 int test_rwops (void) |
e451d5d288e9
Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
3737
diff
changeset
|
259 { |
e451d5d288e9
Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents:
3737
diff
changeset
|
260 #endif /* TEST_STANDALONE */ |
3722
d8772964e402
Added more strict warning flags.
Edgar Simo <bobbens@gmail.com>
parents:
3713
diff
changeset
|
261 |
3713 | 262 SDL_ATinit( "SDL_RWops" ); |
263 | |
3737
9689eaa6d2e3
Made rwops tests a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents:
3722
diff
changeset
|
264 rwops_testParam(); |
3713 | 265 rwops_testMem(); |
266 rwops_testConstMem(); | |
267 rwops_testFile(); | |
268 rwops_testFP(); | |
269 | |
3741
808fad5fb593
Added command line options.
Edgar Simo <bobbens@gmail.com>
parents:
3740
diff
changeset
|
270 return SDL_ATfinish(); |
3713 | 271 } |