aboutsummaryrefslogtreecommitdiffstats
path: root/tests/serd_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/serd_test.c')
-rw-r--r--tests/serd_test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c
index d41bbfc1..4a1c2485 100644
--- a/tests/serd_test.c
+++ b/tests/serd_test.c
@@ -39,11 +39,13 @@ test_strtod(double dbl, double max_delta)
char buf[1024];
snprintf(buf, sizeof(buf), "%f", dbl);
- char* endptr = NULL;
- const double out = serd_strtod(buf, &endptr);
+ size_t end = 0;
+ const double out = serd_strtod(buf, &end);
const double diff = fabs(out - dbl);
assert(diff <= max_delta);
+ assert(end == strlen(buf));
+
return 0;
}