Added test of the assertion reporting system
authorSam Lantinga <slouken@libsdl.org>
Tue, 19 Apr 2011 11:41:45 -0700
changeset 5542882871b2db1a
parent 5541 b63f1383f8c9
child 5543 82cd9b2ec39c
Added test of the assertion reporting system
test/testplatform.c
     1.1 --- a/test/testplatform.c	Tue Apr 19 14:12:56 2011 -0400
     1.2 +++ b/test/testplatform.c	Tue Apr 19 11:41:45 2011 -0700
     1.3 @@ -172,6 +172,16 @@
     1.4      SDL_assert_release(0 && "This is a test");
     1.5  #endif
     1.6  
     1.7 +    {
     1.8 +        const SDL_assert_data *item = SDL_GetAssertionReport();
     1.9 +        while (item) {
    1.10 +            printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\n",
    1.11 +                item->condition, item->function, item->filename,
    1.12 +                item->linenum, item->trigger_count,
    1.13 +                item->always_ignore ? "yes" : "no");
    1.14 +            item = item->next;
    1.15 +        }
    1.16 +    }
    1.17      return (0);
    1.18  }
    1.19