From: Mike D. Lowis Date: Tue, 5 Jun 2012 20:49:50 +0000 (-0400) Subject: Updated unit tests for singly linked list X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=6588b19d82ce50174120786eed497c106b9e6ddf;p=projs%2Flibcds.git Updated unit tests for singly linked list --- diff --git a/tests/test_sll.cpp b/tests/test_sll.cpp index 4ac71a3..2c014ff 100644 --- a/tests/test_sll.cpp +++ b/tests/test_sll.cpp @@ -367,7 +367,16 @@ namespace { //------------------------------------------------------------------------- // Test sll_insert function //------------------------------------------------------------------------- + TEST(Verify_insert_does_nothing_if_list_is_null) + { + CHECK( NULL == sll_insert( NULL, 0, (void*)0x1234 ) ); + } + //------------------------------------------------------------------------- // Test sll_delete function //------------------------------------------------------------------------- + TEST(Verify_delete_does_nothing_if_list_is_null) + { + CHECK( NULL == sll_insert( NULL, 0, 0 ) ); + } }