diff --git a/test/tests/testunity.c b/test/tests/testunity.c index bd612db..90b842f 100644 --- a/test/tests/testunity.c +++ b/test/tests/testunity.c @@ -1476,6 +1476,16 @@ void testEqualStringArrayIfBothNulls(void) TEST_ASSERT_EQUAL_STRING_ARRAY(expStrings, testStrings, 4); } +void testNotEqualStringArrayLengthZero(void) +{ + const char *testStrings[] = {NULL}; + const char **expStrings = NULL; + + EXPECT_ABORT_BEGIN + TEST_ASSERT_EQUAL_STRING_ARRAY(expStrings, testStrings, 0); + VERIFY_FAILS_END +} + void testEqualMemory(void) { const char *testString = "whatever"; @@ -1516,6 +1526,13 @@ void testNotEqualMemory4(void) VERIFY_FAILS_END } +void testNotEqualMemoryLengthZero(void) +{ + EXPECT_ABORT_BEGIN + TEST_ASSERT_EQUAL_MEMORY(NULL, NULL, 0); + VERIFY_FAILS_END +} + void testEqualIntArrays(void) { int p0[] = {1, 8, 987, -2};