clar: Move cl_assert_equal_sz() definition to clar.h

This commit is contained in:
nulltoken 2013-09-12 13:50:35 +02:00
parent 273ddc54f5
commit 6f2003612c
2 changed files with 1 additions and 2 deletions

View File

@ -68,6 +68,7 @@ void cl_fixture_cleanup(const char *fixture_name);
#define cl_assert_equal_p(p1,p2) clar__assert_equal(__FILE__,__LINE__,"Pointer mismatch: " #p1 " != " #p2, 1, "%p", (p1), (p2)) #define cl_assert_equal_p(p1,p2) clar__assert_equal(__FILE__,__LINE__,"Pointer mismatch: " #p1 " != " #p2, 1, "%p", (p1), (p2))
#define cl_assert_equal_sz(sz1,sz2) clar__assert_equal(__FILE__,__LINE__,#sz1 " != " #sz2, 1, "%"PRIuZ, (size_t)(sz1), (size_t)(sz2))
void clar__fail( void clar__fail(
const char *file, const char *file,

View File

@ -32,8 +32,6 @@ void cl_git_report_failure(int, const char *, int, const char *);
#define cl_assert_at_line(expr,file,line) \ #define cl_assert_at_line(expr,file,line) \
clar__assert((expr) != 0, file, line, "Expression is not true: " #expr, NULL, 1) clar__assert((expr) != 0, file, line, "Expression is not true: " #expr, NULL, 1)
#define cl_assert_equal_sz(sz1,sz2) clar__assert_equal(__FILE__,__LINE__,#sz1 " != " #sz2, 1, PRIuZ, (size_t)(sz1), (size_t)(sz2))
GIT_INLINE(void) clar__assert_in_range( GIT_INLINE(void) clar__assert_in_range(
int lo, int val, int hi, int lo, int val, int hi,
const char *file, int line, const char *err, int should_abort) const char *file, int line, const char *err, int should_abort)