Commit dd954a3735b429c976459dbb3d26405c41de2352

Edward Thomson 2014-03-07T10:53:00

Update clar to e1990d6

diff --git a/tests/clar.c b/tests/clar.c
index 90aeb57..5354241 100644
--- a/tests/clar.c
+++ b/tests/clar.c
@@ -476,12 +476,12 @@ void clar__assert_equal(
 	else if(!strcmp("%.*s", fmt)) {
 		const char *s1 = va_arg(args, const char *);
 		const char *s2 = va_arg(args, const char *);
-		size_t len = va_arg(args, size_t);
+		int len = va_arg(args, int);
 		is_equal = (!s1 || !s2) ? (s1 == s2) : !strncmp(s1, s2, len);
 
 		if (!is_equal) {
 			if (s1 && s2) {
-				size_t pos;
+				int pos;
 				for (pos = 0; s1[pos] == s2[pos] && pos < len; ++pos)
 					/* find differing byte offset */;
 				p_snprintf(buf, sizeof(buf), "'%.*s' != '%.*s' (at byte %d)",
diff --git a/tests/clar.h b/tests/clar.h
index 7f77f75..87ff6d9 100644
--- a/tests/clar.h
+++ b/tests/clar.h
@@ -60,8 +60,8 @@ void cl_fixture_cleanup(const char *fixture_name);
 #define cl_assert_equal_s(s1,s2) clar__assert_equal(__FILE__,__LINE__,"String mismatch: " #s1 " != " #s2, 1, "%s", (s1), (s2))
 #define cl_assert_equal_s_(s1,s2,note) clar__assert_equal(__FILE__,__LINE__,"String mismatch: " #s1 " != " #s2 " (" #note ")", 1, "%s", (s1), (s2))
 
-#define cl_assert_equal_strn(s1,s2,len) clar__assert_equal(__FILE__,__LINE__,"String mismatch: " #s1 " != " #s2, 1, "%.*s", (s1), (s2), (size_t)(len))
-#define cl_assert_equal_strn_(s1,s2,len,note) clar__assert_equal(__FILE__,__LINE__,"String mismatch: " #s1 " != " #s2 " (" #note ")", 1, "%.*s", (s1), (s2), (size_t)(len))
+#define cl_assert_equal_strn(s1,s2,len) clar__assert_equal(__FILE__,__LINE__,"String mismatch: " #s1 " != " #s2, 1, "%.*s", (s1), (s2), (int)(len))
+#define cl_assert_equal_strn_(s1,s2,len,note) clar__assert_equal(__FILE__,__LINE__,"String mismatch: " #s1 " != " #s2 " (" #note ")", 1, "%.*s", (s1), (s2), (int)(len))
 
 #define cl_assert_equal_i(i1,i2) clar__assert_equal(__FILE__,__LINE__,#i1 " != " #i2, 1, "%d", (int)(i1), (int)(i2))
 #define cl_assert_equal_i_(i1,i2,note) clar__assert_equal(__FILE__,__LINE__,#i1 " != " #i2 " (" #note ")", 1, "%d", (i1), (i2))