1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
//////////////////////////////////////////////////////////////////////
// Assert.cc
//////////////////////////////////////////////////////////////////////
#include <stdio.h>
#include <stdlib.h>
#include "Assert.h"
//////////////////////////////////////////////////////////////////////
// Write out assertion error message
//////////////////////////////////////////////////////////////////////
int _ASSERT_FAILED (const char *filename, int line_number, const char *error_msg){
fprintf (stderr, "Assertion failed in file \"%s\", line %d: %s\n",
filename, line_number, error_msg);
abort();
return 0;
}
|