assert bugs through common interface
[c11tester.git] / common.cc
index f4aa7ecefa023417c7eec4680e38e1c25a5cc13b..8b5c99717137d1d3f6a95b423fb6c8bf6fc2b08f 100644 (file)
--- a/common.cc
+++ b/common.cc
@@ -46,9 +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->switch_to_master(NULL);
+               model->assert_bug(msg, true);
        }
 }