From bff491c73c1c0765edb2164dee313e7b3619a4cc Mon Sep 17 00:00:00 2001 From: jsalling Date: Tue, 3 May 2016 20:47:00 -0500 Subject: [PATCH] Test strings not equal to NULL when using length parameter --- test/tests/testunity.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/tests/testunity.c b/test/tests/testunity.c index eb6601a..f1316b9 100644 --- a/test/tests/testunity.c +++ b/test/tests/testunity.c @@ -1390,6 +1390,13 @@ void testNotEqualString_ExpectedStringIsNull(void) VERIFY_FAILS_END } +void testNotEqualStringLen_ExpectedStringIsNull(void) +{ + EXPECT_ABORT_BEGIN + TEST_ASSERT_EQUAL_STRING_LEN(NULL, "bar", 1); + VERIFY_FAILS_END +} + void testNotEqualString_ActualStringIsNull(void) { EXPECT_ABORT_BEGIN @@ -1397,6 +1404,13 @@ void testNotEqualString_ActualStringIsNull(void) VERIFY_FAILS_END } +void testNotEqualStringLen_ActualStringIsNull(void) +{ + EXPECT_ABORT_BEGIN + TEST_ASSERT_EQUAL_STRING_LEN("foo", NULL, 1); + VERIFY_FAILS_END +} + void testEqualStringArrays(void) { const char *testStrings[] = { "foo", "boo", "woo", "moo" };