diff options
author | Russell Belfer <arrbee@arrbee.com> | 2011-11-30 13:10:47 -0800 |
---|---|---|
committer | Russell Belfer <arrbee@arrbee.com> | 2011-11-30 13:10:47 -0800 |
commit | 969d588d9ab957addb2cecd0f18f7c3699b032b6 (patch) | |
tree | e6dfe6149c816cb5b588ddcee9535d7caccd818d /tests-clay/clay_libgit2.h | |
parent | f5f048265800659aa6f495c05eb99e1b76a713e2 (diff) | |
download | libgit2-969d588d9ab957addb2cecd0f18f7c3699b032b6.tar.gz |
Optimized of git_buf_join.
This streamlines git_buf_join and removes the join-append behavior,
opting instead for a very compact join-replace of the git_buf contents.
The unit tests had to be updated to remove the join-append tests and
have a bunch more exhaustive tests added.
Diffstat (limited to 'tests-clay/clay_libgit2.h')
-rw-r--r-- | tests-clay/clay_libgit2.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests-clay/clay_libgit2.h b/tests-clay/clay_libgit2.h index 2eedc61d2..6b14b7d6e 100644 --- a/tests-clay/clay_libgit2.h +++ b/tests-clay/clay_libgit2.h @@ -29,15 +29,16 @@ * Wrapper for string comparison that knows about nulls. */ #define cl_assert_strequal(a,b) \ - cl_assert_strequal_internal(a,b,__FILE__,__LINE__) + cl_assert_strequal_internal(a,b,__FILE__,__LINE__,"string mismatch: " #a " != " #b) -GIT_INLINE(void) cl_assert_strequal_internal(const char *a, const char *b, const char *file, int line) +GIT_INLINE(void) cl_assert_strequal_internal( + const char *a, const char *b, const char *file, int line, const char *err) { int match = (a == NULL || b == NULL) ? (a == b) : (strcmp(a, b) == 0); if (!match) { char buf[4096]; snprintf(buf, 4096, "'%s' != '%s'", a, b); - clay__assert(0, file, line, buf, "Strings do not match", 1); + clay__assert(0, file, line, buf, err, 1); } } |