From a92b4038179c3706bd176097be1caabd88824755 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 5 May 2021 19:57:39 -0400 Subject: Add tests --- tests/test_errors.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/test_errors.c (limited to 'tests/test_errors.c') diff --git a/tests/test_errors.c b/tests/test_errors.c new file mode 100644 index 0000000..f9d641f --- /dev/null +++ b/tests/test_errors.c @@ -0,0 +1,11 @@ +#include "cleanpath.h" +#include "framework.h" + +int main() { + struct CleanPath *path; + path = NULL; + + //intentionally bad + myassert(cleanpath_init("good", NULL) == NULL, "cleanpath_init() returned non-NULL on NULL sep\n"); + myassert(cleanpath_init(NULL, "good") == NULL, "cleanpath_init() returned non-NULL on NULL path\n"); +} \ No newline at end of file -- cgit