sdlGetAssertionReport function

Pointer<SdlAssertData> sdlGetAssertionReport()

Get a list of all assertion failures.

This function gets all assertions triggered since the last call to SDL_ResetAssertionReport(), or the start of the program.

The proper way to examine this data looks something like this:

const SDL_AssertData *item = SDL_GetAssertionReport();
while (item) {
printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
item->condition, item->function, item->filename,
item->linenum, item->trigger_count,
item->always_ignore ? "yes" : "no");
item = item->next;
}

\returns a list of all failed assertions or NULL if the list is empty. This memory should not be modified or freed by the application.

\since This function is available since SDL 2.0.0.

\sa SDL_ResetAssertionReport

extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void)

Implementation

Pointer<SdlAssertData> sdlGetAssertionReport() {
  final sdlGetAssertionReportLookupFunction = libSdl2.lookupFunction<
      Pointer<SdlAssertData> Function(),
      Pointer<SdlAssertData> Function()>('SDL_GetAssertionReport');
  return sdlGetAssertionReportLookupFunction();
}