]> git.mdlowis.com Git - projs/libcds.git/commitdiff
Updated unit tests for singly linked list
authorMike D. Lowis <mike@mdlowis.com>
Tue, 5 Jun 2012 20:49:50 +0000 (16:49 -0400)
committerMike D. Lowis <mike@mdlowis.com>
Tue, 5 Jun 2012 20:49:50 +0000 (16:49 -0400)
tests/test_sll.cpp

index 4ac71a34fa98901c10832ab88e42570d65845ee6..2c014ff7f4e79db50d0db52babfe4c6d2c83f8a0 100644 (file)
@@ -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 ) );
+    }
 }