diff options
author | Mattias Andrée <maandree@kth.se> | 2018-08-28 14:25:50 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2018-08-28 14:25:50 +0200 |
commit | 60301af26f2068f7a483176984c693f04a7e1532 (patch) | |
tree | 33d4af87c55464b2f67be2da154708cc9b7e2115 | |
parent | Replace exit and fprintf (diff) | |
download | libsimple-60301af26f2068f7a483176984c693f04a7e1532.tar.gz libsimple-60301af26f2068f7a483176984c693f04a7e1532.tar.bz2 libsimple-60301af26f2068f7a483176984c693f04a7e1532.tar.xz |
Warn about unran tests under valgrind
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r-- | libsimple.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libsimple.c b/libsimple.c index 731396d..24c5dd3 100644 --- a/libsimple.c +++ b/libsimple.c @@ -990,6 +990,12 @@ main(void) tv2.tv_sec = 1, tv2.tv_usec = 0L; assert(libsimple_cmptimeval(&tv1, &tv2) == -1); + if (!have_custom_malloc()) { + stderr_real = 1; + fprintf(stderr, "\nSome tests have not been ran because malloc(3) was not " + "replaced, this is normal if running under valgrind(1).\n\n"); + } + return 0; } |