diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2013-06-03 18:34:10 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2013-06-03 18:34:10 +0000 |
commit | f143c3cab79c59dd57124f19d16ac35253843136 (patch) | |
tree | 9fa67aa3d59e9d96f5f37858e95c4ab91960ea92 /test/CuTest.c | |
parent | 6f61a1acd01dc2ad1d2f5c1f7458702c77c69f9c (diff) | |
download | libserf-tarball-serf-1.2.1.tar.gz |
serf-1.2.1HEADserf-1.2.1master
Diffstat (limited to 'test/CuTest.c')
-rw-r--r-- | test/CuTest.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/test/CuTest.c b/test/CuTest.c index 315f59f..377d396 100644 --- a/test/CuTest.c +++ b/test/CuTest.c @@ -205,13 +205,14 @@ void CuAssert_Line(CuTest* tc, const char* file, int line, const char* message, CuFail_Line(tc, file, line, NULL, message); } -void CuAssertStrEquals_LineMsg(CuTest* tc, const char* file, int line, const char* message, - const char* expected, const char* actual) +void CuAssertStrnEquals_LineMsg(CuTest* tc, const char* file, int line, const char* message, + const char* expected, size_t explen, + const char* actual) { CuString string; if ((expected == NULL && actual == NULL) || (expected != NULL && actual != NULL && - strcmp(expected, actual) == 0)) + strncmp(expected, actual, explen) == 0)) { return; } @@ -230,6 +231,12 @@ void CuAssertStrEquals_LineMsg(CuTest* tc, const char* file, int line, const cha CuFailInternal(tc, file, line, &string); } +void CuAssertStrEquals_LineMsg(CuTest* tc, const char* file, int line, const char* message, + const char* expected, const char* actual) +{ + CuAssertStrnEquals_LineMsg(tc, file, line, message, expected, strlen(expected), actual); +} + void CuAssertIntEquals_LineMsg(CuTest* tc, const char* file, int line, const char* message, int expected, int actual) { |