There was an error while loading. Please reload this page.
1 parent 0bad089 commit f1ca39aCopy full SHA for f1ca39a
tests/bsdtests.c
@@ -164,6 +164,20 @@ test_uint32_format(uint32_t actual, uint32_t expected, const char *format, ...)
164
_test_uint32(NULL, 0, desc, actual, expected);
165
}
166
167
+void
168
+_test_uint32_not(const char* file, long line, const char* desc, uint32_t actual, uint32_t unexpected)
169
+{
170
+ _test_print(file, line, desc,
171
+ (actual != unexpected), "%u", actual, "!%u", unexpected);
172
+}
173
+
174
175
+test_uint32_not_format(uint32_t actual, uint32_t unexpected, const char *format, ...)
176
177
+GENERATE_DESC
178
+_test_uint32_not(NULL, 0, desc, actual, unexpected);
179
180
181
void
182
_test_int32(const char* file, long line, const char* desc, int32_t actual, int32_t expected)
183
{
tests/bsdtests.h
@@ -111,6 +111,10 @@ void _test_uint32(const char* file, long line, const char* desc, uint32_t actual
111
#define test_uint32(a,b,c) _test_uint32(__SOURCE_FILE__, __LINE__, a, b, c)
112
void test_uint32_format(uint32_t actual, uint32_t expected, const char *format, ...) __printflike(3,4);
113
114
+void _test_uint32_not(const char* file, long line, const char* desc, uint32_t actual, uint32_t unexpected);
115
+#define test_uint32_not(a,b,c) _test_uint32(__SOURCE_FILE__, __LINE__, a, b, c)
116
+void test_uint32_not_format(uint32_t actual, uint32_t unexpected, const char *format, ...) __printflike(3,4);
117
118
void _test_int32(const char* file, long line, const char* desc, int32_t actual, int32_t expected);
119
#define test_int32(a,b,c) _test_int32(__SOURCE_FILE__, __LINE__, a, b, c)
120
void test_int32_format(int32_t actual, int32_t expected, const char* format, ...) __printflike(3,4);
0 commit comments