annotate test/automated/rwops/rwops.c @ 3713:a34bab848c7e gsoc2009_unit_tests

Better output. Newline handling. rwops test handles ConstMem, FP and File.
author Edgar Simo <bobbens@gmail.com>
date Sat, 20 Jun 2009 16:46:58 +0000
parents
children d8772964e402
rev   line source
3713
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
1 /**
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
2 * Automated SDL_RWops test.
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
3 *
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
4 * Written by Edgar Simo "bobbens"
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
5 *
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
6 * Released under Public Domain.
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
7 */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
8
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
9
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
10 #include "SDL.h"
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
11 #include "SDL_at.h"
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
12
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
13
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
14 static const char hello_world[] = "Hello World!";
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
15
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
16
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
17 /**
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
18 * @brief Does a generic rwops test.
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
19 *
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
20 * RWops should have "Hello World!" in it already if write is disabled.
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
21 *
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
22 * @param write Test writing also.
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
23 * @return 1 if an assert is failed.
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
24 */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
25 static int rwops_testGeneric( SDL_RWops *rw, int write )
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
26 {
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
27 char buf[sizeof(hello_world)];
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
28 int i;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
29
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
30 if (write) {
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
31 /* Test write. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
32 i = SDL_RWwrite( rw, hello_world, sizeof(hello_world)-1, 1 );
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
33 if (SDL_ATassert( "Writing with SDL_RWwrite", i == 1 ))
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
34 return 1;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
35 }
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
36
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
37 /* Test seek. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
38 i = SDL_RWseek( rw, 6, RW_SEEK_SET );
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
39 if (SDL_ATassert( "Seeking with SDL_RWseek", i == 6 ))
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
40 return 1;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
41
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
42 /* Test seek. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
43 i = SDL_RWseek( rw, 0, RW_SEEK_SET );
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
44 if (SDL_ATassert( "Seeking with SDL_RWseek", i == 0 ))
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
45 return 1;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
46
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
47 /* Test read. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
48 i = SDL_RWread( rw, buf, 1, sizeof(hello_world)-1 );
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
49 if (i != sizeof(hello_world)-1)
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
50 printf("%s\n", SDL_GetError());
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
51 if (SDL_ATassert( "Reading with SDL_RWread", i == sizeof(hello_world)-1 ))
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
52 return 1;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
53 if (SDL_ATassert( "Memory read does not match memory written",
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
54 memcmp( buf, hello_world, sizeof(hello_world)-1 ) == 0 ))
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
55 return 1;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
56
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
57 return 0;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
58 }
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
59
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
60
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
61 /**
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
62 * @brief Tests opening from memory.
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
63 */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
64 static void rwops_testMem (void)
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
65 {
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
66 char mem[sizeof(hello_world)];
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
67 SDL_RWops *rw;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
68
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
69 /* Begin testcase. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
70 SDL_ATbegin( "SDL_RWFromMem" );
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
71
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
72 /* Open. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
73 rw = SDL_RWFromMem( mem, sizeof(mem) );
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
74 if (SDL_ATassert( "Opening memory with SDL_RWFromMem", rw != NULL ))
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
75 return;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
76
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
77 /* Run generic tests. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
78 if (rwops_testGeneric( rw, 1 ))
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
79 return;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
80
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
81 /* Close. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
82 SDL_FreeRW( rw );
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
83
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
84 /* End testcase. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
85 SDL_ATend();
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
86 }
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
87
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
88
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
89 static const char const_mem[] = "Hello World!";
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
90 /**
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
91 * @brief Tests opening from memory.
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
92 */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
93 static void rwops_testConstMem (void)
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
94 {
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
95 SDL_RWops *rw;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
96
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
97 /* Begin testcase. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
98 SDL_ATbegin( "SDL_RWFromConstMem" );
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
99
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
100 /* Open. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
101 rw = SDL_RWFromConstMem( const_mem, sizeof(const_mem) );
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
102 if (SDL_ATassert( "Opening memory with SDL_RWFromConstMem", rw != NULL ))
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
103 return;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
104
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
105 /* Run generic tests. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
106 if (rwops_testGeneric( rw, 0 ))
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
107 return;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
108
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
109 /* Close. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
110 SDL_FreeRW( rw );
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
111
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
112 /* End testcase. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
113 SDL_ATend();
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
114 }
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
115
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
116
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
117 /**
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
118 * @brief Tests opening from memory.
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
119 */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
120 static void rwops_testFile (void)
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
121 {
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
122 SDL_RWops *rw;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
123 int i;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
124
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
125 /* Begin testcase. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
126 SDL_ATbegin( "SDL_RWFromFile" );
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
127
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
128 /* Open. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
129 rw = SDL_RWFromFile( "rwops/read", "r" );
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
130 if (SDL_ATassert( "Opening memory with SDL_RWFromFile", rw != NULL ))
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
131 return;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
132
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
133 /* Test writing. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
134 i = SDL_RWwrite( rw, hello_world, sizeof(hello_world), 1 );
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
135 if (SDL_ATassert( "Writing with SDL_RWwrite", i == 0 ))
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
136 return;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
137
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
138 /* Run generic tests. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
139 if (rwops_testGeneric( rw, 0 ))
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
140 return;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
141
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
142 /* Close. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
143 SDL_FreeRW( rw );
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
144
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
145 /* End testcase. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
146 SDL_ATend();
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
147 }
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
148
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
149
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
150 /**
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
151 * @brief Tests opening from memory.
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
152 */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
153 static void rwops_testFP (void)
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
154 {
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
155 #ifdef HAVE_STDIO_H
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
156 FILE *fp;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
157 SDL_RWops *rw;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
158 int i;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
159
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
160 /* Begin testcase. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
161 SDL_ATbegin( "SDL_RWFromFP" );
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
162
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
163 /* Open. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
164 fp = fopen( "rwops/write", "w+" );
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
165 if (fp == NULL) {
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
166 SDL_ATprint("Failed to open file rwops/write");
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
167 SDL_ATend();
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
168 return;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
169 }
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
170 rw = SDL_RWFromFP( fp, 1 );
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
171 if (SDL_ATassert( "Opening memory with SDL_RWFromFP", rw != NULL ))
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
172 return;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
173
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
174 /* Run generic tests. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
175 if (rwops_testGeneric( rw, 1 ))
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
176 return;
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
177
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
178 /* Close. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
179 SDL_FreeRW( rw );
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
180
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
181 /* End testcase. */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
182 SDL_ATend();
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
183 #endif /* HAVE_STDIO_H */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
184 }
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
185
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
186
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
187 /**
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
188 * @brief Entry point.
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
189 */
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
190 int main( int argc, const char *argv[] )
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
191 {
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
192 SDL_ATinit( "SDL_RWops" );
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
193
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
194 rwops_testMem();
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
195 rwops_testConstMem();
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
196 rwops_testFile();
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
197 rwops_testFP();
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
198
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
199 return SDL_ATfinish(1);
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
200 }