# HG changeset patch # User Edgar Simo # Date 1249547982 0 # Node ID 5b48a529fd8a647e0e74e9033e91cec829ece598 # Parent f47658c8f87aae854092a706a599283859a4bc9b More debugging information when test fails. diff -r f47658c8f87a -r 5b48a529fd8a test/automated/platform/platform.c --- a/test/automated/platform/platform.c Wed Aug 05 18:56:56 2009 +0000 +++ b/test/automated/platform/platform.c Thu Aug 06 08:39:42 2009 +0000 @@ -132,6 +132,64 @@ /** + * @brief Gets the name of the platform. + */ +const char *platform_getPlatform (void) +{ + return +#if __AIX__ + "AIX" +#elif __BEOS__ + "BeOS" +#elif __BSDI__ + "BSDI" +#elif __DREAMCAST__ + "Dreamcast" +#elif __FREEBSD__ + + "FreeBSD" +#elif __HPUX__ + "HP-UX" +#elif __IRIX__ + "Irix" +#elif __LINUX__ + "Linux" +#elif __MINT__ + "Atari MiNT" +#elif __MACOS__ + "MacOS Classic" +#elif __MACOSX__ + "Mac OS X" +#elif __NETBSD__ + "NetBSD" +#elif __OPENBSD__ + "OpenBSD" +#elif __OS2__ + "OS/2" +#elif __OSF__ + "OSF/1" +#elif __QNXNTO__ + "QNX Neutrino" +#elif __RISCOS__ + "RISC OS" +#elif __SOLARIS__ + "Solaris" +#elif __WIN32__ +#ifdef _WIN32_WCE + "Windows CE" +#else + "Windows" +#endif +#elif __IPHONEOS__ + "iPhone OS" +#else + "an unknown operating system! (see SDL_platform.h)" +#endif + ; +} + + +/** * @brief Platform test entrypoint. */ #ifdef TEST_STANDALONE @@ -147,56 +205,7 @@ SDL_ATinit( "Platform" ); /* Debug information. */ - SDL_ATprintVerbose( 1, "%s System detected\n", -#if __AIX__ - "AIX" -#elif __BEOS__ - "BeOS" -#elif __BSDI__ - "BSDI" -#elif __DREAMCAST__ - "Dreamcast" -#elif __FREEBSD__ - - "FreeBSD" -#elif __HPUX__ - "HP-UX" -#elif __IRIX__ - "Irix" -#elif __LINUX__ - "Linux" -#elif __MINT__ - "Atari MiNT" -#elif __MACOS__ - "MacOS Classic" -#elif __MACOSX__ - "Mac OS X" -#elif __NETBSD__ - "NetBSD" -#elif __OPENBSD__ - "OpenBSD" -#elif __OS2__ - "OS/2" -#elif __OSF__ - "OSF/1" -#elif __QNXNTO__ - "QNX Neutrino" -#elif __RISCOS__ - "RISC OS" -#elif __SOLARIS__ - "Solaris" -#elif __WIN32__ -#ifdef _WIN32_WCE - "Windows CE" -#else - "Windows" -#endif -#elif __IPHONEOS__ - "iPhone OS" -#else - "an unknown operating system! (see SDL_platform.h)" -#endif - ); + SDL_ATprintVerbose( 1, "%s System detected\n", platform_getPlatform() ); SDL_ATprintVerbose( 1, "System is %s endian\n", #ifdef SDL_LIL_ENDIAN "little" diff -r f47658c8f87a -r 5b48a529fd8a test/automated/platform/platform.h --- a/test/automated/platform/platform.h Wed Aug 05 18:56:56 2009 +0000 +++ b/test/automated/platform/platform.h Thu Aug 06 08:39:42 2009 +0000 @@ -11,6 +11,7 @@ # define _TEST_PLATFORM +const char *platform_getPlatform (void); int test_platform (void); diff -r f47658c8f87a -r 5b48a529fd8a test/automated/render/render.c --- a/test/automated/render/render.c Wed Aug 05 18:56:56 2009 +0000 +++ b/test/automated/render/render.c Thu Aug 06 08:39:42 2009 +0000 @@ -970,6 +970,7 @@ int test_render (void) { #endif /* TEST_STANDALONE */ + int failed; int i, j, nd, nr; int ret; const char *driver, *str; @@ -997,6 +998,7 @@ * Surface on video mode tests. */ /* Run for all video modes. */ + failed = 0; for (i=0; i 0) { + SDL_ATprintErr( "Tests run with SDL %d.%d.%d revision %d\n", + ver.major, ver.minor, ver.patch, rev ); + SDL_ATprintErr( "System is running %s and is %s endian\n", + platform_getPlatform(), +#ifdef SDL_LIL_ENDIAN + "little" +#else + "big" +#endif + ); + } + + return failed; }