mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-11 19:58:02 +00:00
Update clar and recreate cl_assert_equal_sz
This updates clar to the version without cl_assert_equal_sz and then adds a new version of that macro the clar_libgit2.h. The new version works around a strange issue that seemed to be arising on release builds with VS 10 64-bit builds.
This commit is contained in:
parent
eefc32d549
commit
f60ed4e649
@ -68,7 +68,6 @@ 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_sz(sz1,sz2) clar__assert_equal(__FILE__,__LINE__,#sz1 " != " #sz2, 1, "%"PRIuZ, (size_t)(sz1), (size_t)(sz2))
|
||||
|
||||
void clar__fail(
|
||||
const char *file,
|
||||
|
@ -43,6 +43,11 @@ GIT_INLINE(void) clar__assert_in_range(
|
||||
}
|
||||
}
|
||||
|
||||
#define cl_assert_equal_sz(sz1,sz2) do { \
|
||||
size_t __sz1 = (sz1), __sz2 = (sz2); \
|
||||
clar__assert_equal(__FILE__,__LINE__,#sz1 " != " #sz2, 1, "%"PRIuZ, __sz1, __sz2); \
|
||||
} while (0)
|
||||
|
||||
#define cl_assert_in_range(L,V,H) \
|
||||
clar__assert_in_range((L),(V),(H),__FILE__,__LINE__,"Range check: " #V " in [" #L "," #H "]", 1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user