From e7e2a01f50b03b3e627c815bfc5a3ef0ed3ba93d Mon Sep 17 00:00:00 2001 From: Mike Gorchak Date: Fri, 20 Nov 2009 07:08:28 +0000 Subject: [PATCH] Output last SDL error in case of test was failed. --- test/automated/SDL_at.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/automated/SDL_at.c b/test/automated/SDL_at.c index 1ce40c7fe..db9aa5d7a 100644 --- a/test/automated/SDL_at.c +++ b/test/automated/SDL_at.c @@ -9,6 +9,7 @@ #include "SDL_at.h" #include "SDL_stdinc.h" +#include "SDL_error.h" #include /* printf/fprintf */ #include /* va_list */ @@ -209,6 +210,7 @@ static void SDL_ATassertFailed( const char *msg ) SDL_ATprintErr( " %s\n", msg ); SDL_ATprintErr( " Test Case '%s'\n", at_test_msg ); SDL_ATprintErr( " Test Suite '%s'\n", at_suite_msg ); + SDL_ATprintErr( " Last SDL error '%s'\n", SDL_GetError() ); /* End. */ SDL_ATendWith(0); } @@ -302,6 +304,3 @@ int SDL_ATprintVerbose( int level, const char *msg, ... ) return ret; } - - -