From 6588b19d82ce50174120786eed497c106b9e6ddf Mon Sep 17 00:00:00 2001 From: "Mike D. Lowis" Date: Tue, 5 Jun 2012 16:49:50 -0400 Subject: [PATCH] Updated unit tests for singly linked list --- tests/test_sll.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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 ) ); + } } -- 2.52.0