mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-23 08:25:58 +01:00
Test string arrays and memory comparison with length 0, it should fail
This commit is contained in:
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user