Improve Obj test coverage
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/5f7272e1 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/5f7272e1 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/5f7272e1 Branch: refs/heads/master Commit: 5f7272e1fad144784c6175b2b469d4fd81dffc59 Parents: 016f193 Author: Nick Wellnhofer <[email protected]> Authored: Thu May 12 13:19:31 2016 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Sun May 15 17:57:34 2016 +0200 ---------------------------------------------------------------------- runtime/core/Clownfish/Test/TestObj.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/5f7272e1/runtime/core/Clownfish/Test/TestObj.c ---------------------------------------------------------------------- diff --git a/runtime/core/Clownfish/Test/TestObj.c b/runtime/core/Clownfish/Test/TestObj.c index 7d24b80..c4cdafe 100644 --- a/runtime/core/Clownfish/Test/TestObj.c +++ b/runtime/core/Clownfish/Test/TestObj.c @@ -96,6 +96,7 @@ test_is_a(TestBatchRunner *runner) { TEST_TRUE(runner, str_class == STRING, "get_class"); TEST_TRUE(runner, Str_Equals(Class_Get_Name(STRING), (Obj*)class_name), "get_class_name"); + TEST_FALSE(runner, Obj_is_a(NULL, OBJ), "NULL is not an Obj"); DECREF(string); } @@ -141,7 +142,7 @@ test_abstract_routines(TestBatchRunner *runner) { void TestObj_Run_IMP(TestObj *self, TestBatchRunner *runner) { - TestBatchRunner_Plan(runner, (TestBatch*)self, 13); + TestBatchRunner_Plan(runner, (TestBatch*)self, 14); test_refcounts(runner); test_To_String(runner); test_Equals(runner);
