mirror of
https://github.com/cryb-to/cryb-to.git
synced 2024-11-23 22:25:46 +00:00
Slight cleanup.
This commit is contained in:
parent
8e0f4a293e
commit
562ffa391e
2 changed files with 6 additions and 2 deletions
|
@ -75,7 +75,7 @@ void t_printv_hex(const uint8_t *, size_t);
|
|||
void t_printv(const char *, ...)
|
||||
CRYB_PRINTF(1, 2);
|
||||
|
||||
#ifdef _IONBF /* proxy for <stdio.h> */
|
||||
#if CRYB_TEST_HAVE_STDIO
|
||||
/*
|
||||
* Convenience functions for temp files
|
||||
*/
|
||||
|
@ -164,7 +164,7 @@ void t_assertion_failed(const char *, const char *, unsigned int,
|
|||
t_assertion_failed(__func__, __FILE__, \
|
||||
__LINE__, "%s", #exp); \
|
||||
} while (0)
|
||||
|
||||
|
||||
CRYB_END
|
||||
|
||||
#endif
|
||||
|
|
|
@ -317,11 +317,15 @@ t_main(t_prepare_func t_prepare, t_cleanup_func t_cleanup,
|
|||
}
|
||||
free(t_plan);
|
||||
setvbuf(stdout, NULL, _IONBF, 0);
|
||||
|
||||
/* check for memory leaks */
|
||||
if (leaktest) {
|
||||
if (t_verbose)
|
||||
t_malloc_printstats(stderr);
|
||||
t_run_test(&t_memory_leak, nt) ? ++pass : ++fail;
|
||||
}
|
||||
|
||||
/* result */
|
||||
t_printv("%d out of %zd tests passed\n", pass, nt);
|
||||
exit(fail > 0 ? 1 : 0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue