model: rework assert_bug() and assert_user_bug() interfaces
[c11tester.git] / common.cc
index 20102b0bba76ecee78f3491302b5768967c482a2..f37f92f1ba7434cdddd365564048b711ddc40816 100644 (file)
--- a/common.cc
+++ b/common.cc
@@ -46,8 +46,9 @@ void assert_hook(void)
 void model_assert(bool expr, const char *file, int line)
 {
        if (!expr) {
-               printf("  [BUG] Program has hit assertion in file %s at line %d\n",
+               char msg[100];
+               sprintf(msg, "Program has hit assertion in file %s at line %d\n",
                                file, line);
-               model->set_assert();
+               model->assert_user_bug(msg);
        }
 }