diff options
Diffstat (limited to 'mps/code/testlib.c')
| -rw-r--r-- | mps/code/testlib.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mps/code/testlib.c b/mps/code/testlib.c index b55e2876ac5..7634fcf181c 100644 --- a/mps/code/testlib.c +++ b/mps/code/testlib.c | |||
| @@ -327,6 +327,7 @@ void verror(const char *format, va_list args) | |||
| 327 | fflush(stdout); /* synchronize */ | 327 | fflush(stdout); /* synchronize */ |
| 328 | vfprintf(stderr, format, args); | 328 | vfprintf(stderr, format, args); |
| 329 | fprintf(stderr, "\n"); | 329 | fprintf(stderr, "\n"); |
| 330 | fflush(stderr); /* make sure the message is output */ | ||
| 330 | exit(1); | 331 | exit(1); |
| 331 | } | 332 | } |
| 332 | 333 | ||
| @@ -373,6 +374,15 @@ void cdie(int res, const char *s) | |||
| 373 | } | 374 | } |
| 374 | 375 | ||
| 375 | 376 | ||
| 377 | /* assert_die -- always die on assertion */ | ||
| 378 | |||
| 379 | void assert_die(const char *file, unsigned line, const char *condition) | ||
| 380 | { | ||
| 381 | error("%s:%u: MPS ASSERTION FAILED: %s\n", file, line, condition); | ||
| 382 | } | ||
| 383 | |||
| 384 | |||
| 385 | |||
| 376 | /* C. COPYRIGHT AND LICENSE | 386 | /* C. COPYRIGHT AND LICENSE |
| 377 | * | 387 | * |
| 378 | * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>. | 388 | * Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>. |