1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 00:15:58 +01:00

Added support for TEST_ASSERT_EQUAL_STRING_LEN*

Compares two strings until maximum n bytes (i.e. strncmp()).
This commit is contained in:
Eivind Tagseth
2015-04-23 15:39:19 +02:00
parent 271f299df5
commit 61c0b0b75c
6 changed files with 169 additions and 1 deletions

View File

@@ -169,10 +169,18 @@ String Assertions
Compare two null-terminate strings. Fail if any character is different or if the lengths are different.
TEST_ASSERT_EQUAL_STRING_LEN(expected, actual, len)
Compare two strings. Fail if any character is different, stop comparing after len characters.
TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, actual, message)
Compare two null-terminate strings. Fail if any character is different or if the lengths are different. Output a custom message on failure.
TEST_ASSERT_EQUAL_STRING_LEN_MESSAGE(expected, actual, len, message)
Compare two strings. Fail if any character is different, stop comparing after len characters. Output a custom message on failure.
Pointer Assertions
------------------