Mercurial > sdl-ios-xcode
comparison test/automated/platform/platform.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 | 216e258f2842 |
children |
comparison
equal
deleted
inserted
replaced
3752:f47658c8f87a | 3753:5b48a529fd8a |
---|---|
130 SDL_ATend(); | 130 SDL_ATend(); |
131 } | 131 } |
132 | 132 |
133 | 133 |
134 /** | 134 /** |
135 * @brief Gets the name of the platform. | |
136 */ | |
137 const char *platform_getPlatform (void) | |
138 { | |
139 return | |
140 #if __AIX__ | |
141 "AIX" | |
142 #elif __BEOS__ | |
143 "BeOS" | |
144 #elif __BSDI__ | |
145 "BSDI" | |
146 #elif __DREAMCAST__ | |
147 "Dreamcast" | |
148 #elif __FREEBSD__ | |
149 | |
150 "FreeBSD" | |
151 #elif __HPUX__ | |
152 "HP-UX" | |
153 #elif __IRIX__ | |
154 "Irix" | |
155 #elif __LINUX__ | |
156 "Linux" | |
157 #elif __MINT__ | |
158 "Atari MiNT" | |
159 #elif __MACOS__ | |
160 "MacOS Classic" | |
161 #elif __MACOSX__ | |
162 "Mac OS X" | |
163 #elif __NETBSD__ | |
164 "NetBSD" | |
165 #elif __OPENBSD__ | |
166 "OpenBSD" | |
167 #elif __OS2__ | |
168 "OS/2" | |
169 #elif __OSF__ | |
170 "OSF/1" | |
171 #elif __QNXNTO__ | |
172 "QNX Neutrino" | |
173 #elif __RISCOS__ | |
174 "RISC OS" | |
175 #elif __SOLARIS__ | |
176 "Solaris" | |
177 #elif __WIN32__ | |
178 #ifdef _WIN32_WCE | |
179 "Windows CE" | |
180 #else | |
181 "Windows" | |
182 #endif | |
183 #elif __IPHONEOS__ | |
184 "iPhone OS" | |
185 #else | |
186 "an unknown operating system! (see SDL_platform.h)" | |
187 #endif | |
188 ; | |
189 } | |
190 | |
191 | |
192 /** | |
135 * @brief Platform test entrypoint. | 193 * @brief Platform test entrypoint. |
136 */ | 194 */ |
137 #ifdef TEST_STANDALONE | 195 #ifdef TEST_STANDALONE |
138 int main( int argc, const char *argv[] ) | 196 int main( int argc, const char *argv[] ) |
139 { | 197 { |
145 #endif /* TEST_STANDALONE */ | 203 #endif /* TEST_STANDALONE */ |
146 | 204 |
147 SDL_ATinit( "Platform" ); | 205 SDL_ATinit( "Platform" ); |
148 | 206 |
149 /* Debug information. */ | 207 /* Debug information. */ |
150 SDL_ATprintVerbose( 1, "%s System detected\n", | 208 SDL_ATprintVerbose( 1, "%s System detected\n", platform_getPlatform() ); |
151 #if __AIX__ | |
152 "AIX" | |
153 #elif __BEOS__ | |
154 "BeOS" | |
155 #elif __BSDI__ | |
156 "BSDI" | |
157 #elif __DREAMCAST__ | |
158 "Dreamcast" | |
159 #elif __FREEBSD__ | |
160 | |
161 "FreeBSD" | |
162 #elif __HPUX__ | |
163 "HP-UX" | |
164 #elif __IRIX__ | |
165 "Irix" | |
166 #elif __LINUX__ | |
167 "Linux" | |
168 #elif __MINT__ | |
169 "Atari MiNT" | |
170 #elif __MACOS__ | |
171 "MacOS Classic" | |
172 #elif __MACOSX__ | |
173 "Mac OS X" | |
174 #elif __NETBSD__ | |
175 "NetBSD" | |
176 #elif __OPENBSD__ | |
177 "OpenBSD" | |
178 #elif __OS2__ | |
179 "OS/2" | |
180 #elif __OSF__ | |
181 "OSF/1" | |
182 #elif __QNXNTO__ | |
183 "QNX Neutrino" | |
184 #elif __RISCOS__ | |
185 "RISC OS" | |
186 #elif __SOLARIS__ | |
187 "Solaris" | |
188 #elif __WIN32__ | |
189 #ifdef _WIN32_WCE | |
190 "Windows CE" | |
191 #else | |
192 "Windows" | |
193 #endif | |
194 #elif __IPHONEOS__ | |
195 "iPhone OS" | |
196 #else | |
197 "an unknown operating system! (see SDL_platform.h)" | |
198 #endif | |
199 ); | |
200 SDL_ATprintVerbose( 1, "System is %s endian\n", | 209 SDL_ATprintVerbose( 1, "System is %s endian\n", |
201 #ifdef SDL_LIL_ENDIAN | 210 #ifdef SDL_LIL_ENDIAN |
202 "little" | 211 "little" |
203 #else | 212 #else |
204 "big" | 213 "big" |