aboutsummaryrefslogtreecommitdiffstats
path: root/doubletotimespec.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2018-08-26 18:18:02 +0200
committerMattias Andrée <maandree@kth.se>2018-08-26 18:18:02 +0200
commit5e6416550f23daff9e622445123b17d2b5d53a8e (patch)
tree49a79366fb90caf1bfecb87537a28e665095dad6 /doubletotimespec.c
parentUpdate README (diff)
downloadlibsimple-5e6416550f23daff9e622445123b17d2b5d53a8e.tar.gz
libsimple-5e6416550f23daff9e622445123b17d2b5d53a8e.tar.bz2
libsimple-5e6416550f23daff9e622445123b17d2b5d53a8e.tar.xz
Add tests
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'doubletotimespec.c')
-rw-r--r--doubletotimespec.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/doubletotimespec.c b/doubletotimespec.c
index a71d662..a104b37 100644
--- a/doubletotimespec.c
+++ b/doubletotimespec.c
@@ -1,5 +1,6 @@
/* See LICENSE file for copyright and license details. */
#include "libsimple.h"
+#ifndef TEST
void
@@ -30,3 +31,15 @@ libsimple_doubletotimespec(struct timespec *ts, double d)
ts->tv_nsec += 1000000000L;
}
}
+
+
+#else
+#include "test.h"
+
+int
+main(void)
+{
+ return 0; /* Tested in libsimple.c */
+}
+
+#endif