diff options
author | David Robillard <d@drobilla.net> | 2015-10-08 20:53:51 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-10-08 20:53:51 +0000 |
commit | e57faf21483c98ec6ed8de3257e77ce1b4e5c8e7 (patch) | |
tree | 476cd8e02d475364dae4967f0a82948dae700305 | |
parent | 0389fb6ee1f05177f5cfd4cb260885cf0ced6722 (diff) | |
download | lilv-e57faf21483c98ec6ed8de3257e77ce1b4e5c8e7.tar.gz lilv-e57faf21483c98ec6ed8de3257e77ce1b4e5c8e7.tar.bz2 lilv-e57faf21483c98ec6ed8de3257e77ce1b4e5c8e7.zip |
Improve test coverage
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5754 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/util.c | 2 | ||||
-rw-r--r-- | test/lilv_test.c | 11 |
2 files changed, 12 insertions, 1 deletions
@@ -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), |