From d985a2ee02311a81feb417677d24903c4b97398f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 10 Jul 2016 13:51:28 -0400 Subject: Test lilv_node_as_float on non-numeric nodes --- test/lilv_test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/lilv_test.c b/test/lilv_test.c index 64021f8..cc3a012 100644 --- a/test/lilv_test.c +++ b/test/lilv_test.c @@ -252,6 +252,7 @@ test_value(void) TEST_ASSERT(!strcmp(lilv_node_as_string(sval), "Foo")); TEST_ASSERT(lilv_node_as_int(ival) == 42); TEST_ASSERT(fabs(lilv_node_as_float(fval) - 1.6180) < FLT_EPSILON); + TEST_ASSERT(isnan(lilv_node_as_float(sval))); LilvNode* loc_abs = lilv_new_file_uri(world, NULL, "/foo/bar"); LilvNode* loc_rel = lilv_new_file_uri(world, NULL, "foo"); -- cgit v1.2.1