From e57faf21483c98ec6ed8de3257e77ce1b4e5c8e7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 8 Oct 2015 20:53:51 +0000 Subject: Improve test coverage git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5754 a436a847-0d15-0410-975c-d299462d15a1 --- src/util.c | 2 +- test/lilv_test.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/util.c b/src/util.c index f9aed2d..d999942 100644 --- a/src/util.c +++ b/src/util.c @@ -441,7 +441,7 @@ lilv_realpath(const char* path) char* real_path = realpath(path, NULL); return real_path ? real_path : lilv_strdup(path); #else - // OSX <= 105, if anyone cares. I sure don't. + // OSX <= 10.5, if anyone cares. I sure don't. char* out = (char*)malloc(PATH_MAX); char* real_path = realpath(path, out); if (!real_path) { diff --git a/test/lilv_test.c b/test/lilv_test.c index c82fd79..f179d33 100644 --- a/test/lilv_test.c +++ b/test/lilv_test.c @@ -340,6 +340,16 @@ test_value(void) /*****************************************************************************/ +static int +test_util(void) +{ + TEST_ASSERT(!lilv_realpath(NULL)); + + return 1; +} + +/*****************************************************************************/ + static int discovery_plugin_found = 0; static void @@ -1932,6 +1942,7 @@ test_world(void) /* add tests here */ static struct TestCase tests[] = { + TEST_CASE(util), TEST_CASE(value), TEST_CASE(verify), TEST_CASE(no_verify), -- cgit v1.2.1