#include <assert.h>
Usage: void test_foo() {
assert(foo() == 4 /* foo should be 4 */);
}
Output would be something like Assertion failed at "foo() == 4 /* foo should be 4 */"
If you run the application in a debugger like GDB, you can see the frame when the abort trap is called.