Lines Matching refs:TEST
22 #define TEST(expected, test) test_case((expected), #test, (test)) macro
35 if (!TEST(1, TEST_int_eq(1, 1)) in test_int()
36 || !TEST(0, TEST_int_eq(1, -1)) in test_int()
37 || !TEST(1, TEST_int_ne(1, 2)) in test_int()
38 || !TEST(0, TEST_int_ne(3, 3)) in test_int()
39 || !TEST(1, TEST_int_lt(4, 9)) in test_int()
40 || !TEST(0, TEST_int_lt(9, 4)) in test_int()
41 || !TEST(1, TEST_int_le(4, 9)) in test_int()
42 || !TEST(1, TEST_int_le(5, 5)) in test_int()
43 || !TEST(0, TEST_int_le(9, 4)) in test_int()
44 || !TEST(1, TEST_int_gt(8, 5)) in test_int()
45 || !TEST(0, TEST_int_gt(5, 8)) in test_int()
46 || !TEST(1, TEST_int_ge(8, 5)) in test_int()
47 || !TEST(1, TEST_int_ge(6, 6)) in test_int()
48 || !TEST(0, TEST_int_ge(5, 8))) in test_int()
58 if (!TEST(1, TEST_uint_eq(3u, 3u)) in test_uint()
59 || !TEST(0, TEST_uint_eq(3u, 5u)) in test_uint()
60 || !TEST(1, TEST_uint_ne(4u, 2u)) in test_uint()
61 || !TEST(0, TEST_uint_ne(6u, 6u)) in test_uint()
62 || !TEST(1, TEST_uint_lt(5u, 9u)) in test_uint()
63 || !TEST(0, TEST_uint_lt(9u, 5u)) in test_uint()
64 || !TEST(1, TEST_uint_le(5u, 9u)) in test_uint()
65 || !TEST(1, TEST_uint_le(7u, 7u)) in test_uint()
66 || !TEST(0, TEST_uint_le(9u, 5u)) in test_uint()
67 || !TEST(1, TEST_uint_gt(11u, 1u)) in test_uint()
68 || !TEST(0, TEST_uint_gt(1u, 11u)) in test_uint()
69 || !TEST(1, TEST_uint_ge(11u, 1u)) in test_uint()
70 || !TEST(1, TEST_uint_ge(6u, 6u)) in test_uint()
71 || !TEST(0, TEST_uint_ge(1u, 11u))) in test_uint()
81 if (!TEST(1, TEST_char_eq('a', 'a')) in test_char()
82 || !TEST(0, TEST_char_eq('a', 'A')) in test_char()
83 || !TEST(1, TEST_char_ne('a', 'c')) in test_char()
84 || !TEST(0, TEST_char_ne('e', 'e')) in test_char()
85 || !TEST(1, TEST_char_lt('i', 'x')) in test_char()
86 || !TEST(0, TEST_char_lt('x', 'i')) in test_char()
87 || !TEST(1, TEST_char_le('i', 'x')) in test_char()
88 || !TEST(1, TEST_char_le('n', 'n')) in test_char()
89 || !TEST(0, TEST_char_le('x', 'i')) in test_char()
90 || !TEST(1, TEST_char_gt('w', 'n')) in test_char()
91 || !TEST(0, TEST_char_gt('n', 'w')) in test_char()
92 || !TEST(1, TEST_char_ge('w', 'n')) in test_char()
93 || !TEST(1, TEST_char_ge('p', 'p')) in test_char()
94 || !TEST(0, TEST_char_ge('n', 'w'))) in test_char()
104 if (!TEST(1, TEST_uchar_eq(49, 49)) in test_uchar()
105 || !TEST(0, TEST_uchar_eq(49, 60)) in test_uchar()
106 || !TEST(1, TEST_uchar_ne(50, 2)) in test_uchar()
107 || !TEST(0, TEST_uchar_ne(66, 66)) in test_uchar()
108 || !TEST(1, TEST_uchar_lt(60, 80)) in test_uchar()
109 || !TEST(0, TEST_uchar_lt(80, 60)) in test_uchar()
110 || !TEST(1, TEST_uchar_le(60, 80)) in test_uchar()
111 || !TEST(1, TEST_uchar_le(78, 78)) in test_uchar()
112 || !TEST(0, TEST_uchar_le(80, 60)) in test_uchar()
113 || !TEST(1, TEST_uchar_gt(88, 37)) in test_uchar()
114 || !TEST(0, TEST_uchar_gt(37, 88)) in test_uchar()
115 || !TEST(1, TEST_uchar_ge(88, 37)) in test_uchar()
116 || !TEST(1, TEST_uchar_ge(66, 66)) in test_uchar()
117 || !TEST(0, TEST_uchar_ge(37, 88))) in test_uchar()
127 if (!TEST(1, TEST_long_eq(123l, 123l)) in test_long()
128 || !TEST(0, TEST_long_eq(123l, -123l)) in test_long()
129 || !TEST(1, TEST_long_ne(123l, 500l)) in test_long()
130 || !TEST(0, TEST_long_ne(1000l, 1000l)) in test_long()
131 || !TEST(1, TEST_long_lt(-8923l, 102934563l)) in test_long()
132 || !TEST(0, TEST_long_lt(102934563l, -8923l)) in test_long()
133 || !TEST(1, TEST_long_le(-8923l, 102934563l)) in test_long()
134 || !TEST(1, TEST_long_le(12345l, 12345l)) in test_long()
135 || !TEST(0, TEST_long_le(102934563l, -8923l)) in test_long()
136 || !TEST(1, TEST_long_gt(84325677l, 12345l)) in test_long()
137 || !TEST(0, TEST_long_gt(12345l, 84325677l)) in test_long()
138 || !TEST(1, TEST_long_ge(84325677l, 12345l)) in test_long()
139 || !TEST(1, TEST_long_ge(465869l, 465869l)) in test_long()
140 || !TEST(0, TEST_long_ge(12345l, 84325677l))) in test_long()
150 if (!TEST(1, TEST_ulong_eq(919ul, 919ul)) in test_ulong()
151 || !TEST(0, TEST_ulong_eq(919ul, 10234ul)) in test_ulong()
152 || !TEST(1, TEST_ulong_ne(8190ul, 66ul)) in test_ulong()
153 || !TEST(0, TEST_ulong_ne(10555ul, 10555ul)) in test_ulong()
154 || !TEST(1, TEST_ulong_lt(10234ul, 1000000ul)) in test_ulong()
155 || !TEST(0, TEST_ulong_lt(1000000ul, 10234ul)) in test_ulong()
156 || !TEST(1, TEST_ulong_le(10234ul, 1000000ul)) in test_ulong()
157 || !TEST(1, TEST_ulong_le(100000ul, 100000ul)) in test_ulong()
158 || !TEST(0, TEST_ulong_le(1000000ul, 10234ul)) in test_ulong()
159 || !TEST(1, TEST_ulong_gt(100000000ul, 22ul)) in test_ulong()
160 || !TEST(0, TEST_ulong_gt(22ul, 100000000ul)) in test_ulong()
161 || !TEST(1, TEST_ulong_ge(100000000ul, 22ul)) in test_ulong()
162 || !TEST(1, TEST_ulong_ge(10555ul, 10555ul)) in test_ulong()
163 || !TEST(0, TEST_ulong_ge(22ul, 100000000ul))) in test_ulong()
173 if (!TEST(1, TEST_size_t_eq((size_t)10, (size_t)10)) in test_size_t()
174 || !TEST(0, TEST_size_t_eq((size_t)10, (size_t)12)) in test_size_t()
175 || !TEST(1, TEST_size_t_ne((size_t)10, (size_t)12)) in test_size_t()
176 || !TEST(0, TEST_size_t_ne((size_t)24, (size_t)24)) in test_size_t()
177 || !TEST(1, TEST_size_t_lt((size_t)30, (size_t)88)) in test_size_t()
178 || !TEST(0, TEST_size_t_lt((size_t)88, (size_t)30)) in test_size_t()
179 || !TEST(1, TEST_size_t_le((size_t)30, (size_t)88)) in test_size_t()
180 || !TEST(1, TEST_size_t_le((size_t)33, (size_t)33)) in test_size_t()
181 || !TEST(0, TEST_size_t_le((size_t)88, (size_t)30)) in test_size_t()
182 || !TEST(1, TEST_size_t_gt((size_t)52, (size_t)33)) in test_size_t()
183 || !TEST(0, TEST_size_t_gt((size_t)33, (size_t)52)) in test_size_t()
184 || !TEST(1, TEST_size_t_ge((size_t)52, (size_t)33)) in test_size_t()
185 || !TEST(1, TEST_size_t_ge((size_t)38, (size_t)38)) in test_size_t()
186 || !TEST(0, TEST_size_t_ge((size_t)33, (size_t)52))) in test_size_t()
196 if (!TEST(1, TEST_time_t_eq((time_t)10, (time_t)10)) in test_time_t()
197 || !TEST(0, TEST_time_t_eq((time_t)10, (time_t)12)) in test_time_t()
198 || !TEST(1, TEST_time_t_ne((time_t)10, (time_t)12)) in test_time_t()
199 || !TEST(0, TEST_time_t_ne((time_t)24, (time_t)24)) in test_time_t()
200 || !TEST(1, TEST_time_t_lt((time_t)30, (time_t)88)) in test_time_t()
201 || !TEST(0, TEST_time_t_lt((time_t)88, (time_t)30)) in test_time_t()
202 || !TEST(1, TEST_time_t_le((time_t)30, (time_t)88)) in test_time_t()
203 || !TEST(1, TEST_time_t_le((time_t)33, (time_t)33)) in test_time_t()
204 || !TEST(0, TEST_time_t_le((time_t)88, (time_t)30)) in test_time_t()
205 || !TEST(1, TEST_time_t_gt((time_t)52, (time_t)33)) in test_time_t()
206 || !TEST(0, TEST_time_t_gt((time_t)33, (time_t)52)) in test_time_t()
207 || !TEST(1, TEST_time_t_ge((time_t)52, (time_t)33)) in test_time_t()
208 || !TEST(1, TEST_time_t_ge((time_t)38, (time_t)38)) in test_time_t()
209 || !TEST(0, TEST_time_t_ge((time_t)33, (time_t)52))) in test_time_t()
222 if (!TEST(1, TEST_ptr(&y)) in test_pointer()
223 || !TEST(0, TEST_ptr(NULL)) in test_pointer()
224 || !TEST(0, TEST_ptr_null(&y)) in test_pointer()
225 || !TEST(1, TEST_ptr_null(NULL)) in test_pointer()
226 || !TEST(1, TEST_ptr_eq(NULL, NULL)) in test_pointer()
227 || !TEST(0, TEST_ptr_eq(NULL, &y)) in test_pointer()
228 || !TEST(0, TEST_ptr_eq(&y, NULL)) in test_pointer()
229 || !TEST(0, TEST_ptr_eq(&y, &x)) in test_pointer()
230 || !TEST(1, TEST_ptr_eq(&x, &x)) in test_pointer()
231 || !TEST(0, TEST_ptr_ne(NULL, NULL)) in test_pointer()
232 || !TEST(1, TEST_ptr_ne(NULL, &y)) in test_pointer()
233 || !TEST(1, TEST_ptr_ne(&y, NULL)) in test_pointer()
234 || !TEST(1, TEST_ptr_ne(&y, &x)) in test_pointer()
235 || !TEST(0, TEST_ptr_ne(&x, &x))) in test_pointer()
245 if (!TEST(0, TEST_true(0)) in test_bool()
246 || !TEST(1, TEST_true(1)) in test_bool()
247 || !TEST(1, TEST_false(0)) in test_bool()
248 || !TEST(0, TEST_false(1))) in test_bool()
260 if (!TEST(1, TEST_str_eq(NULL, NULL)) in test_string()
261 || !TEST(1, TEST_str_eq("abc", buf)) in test_string()
262 || !TEST(0, TEST_str_eq("abc", NULL)) in test_string()
263 || !TEST(0, TEST_str_eq("abc", "")) in test_string()
264 || !TEST(0, TEST_str_eq(NULL, buf)) in test_string()
265 || !TEST(0, TEST_str_ne(NULL, NULL)) in test_string()
266 || !TEST(0, TEST_str_eq("", NULL)) in test_string()
267 || !TEST(0, TEST_str_eq(NULL, "")) in test_string()
268 || !TEST(0, TEST_str_ne("", "")) in test_string()
269 || !TEST(0, TEST_str_eq("\1\2\3\4\5", "\1x\3\6\5")) in test_string()
270 || !TEST(0, TEST_str_ne("abc", buf)) in test_string()
271 || !TEST(1, TEST_str_ne("abc", NULL)) in test_string()
272 || !TEST(1, TEST_str_ne(NULL, buf)) in test_string()
273 || !TEST(0, TEST_str_eq("abcdef", "abcdefghijk"))) in test_string()
285 if (!TEST(1, TEST_mem_eq(NULL, 0, NULL, 0)) in test_memory()
286 || !TEST(1, TEST_mem_eq(NULL, 1, NULL, 2)) in test_memory()
287 || !TEST(0, TEST_mem_eq(NULL, 0, "xyz", 3)) in test_memory()
288 || !TEST(0, TEST_mem_eq(NULL, 7, "abc", 3)) in test_memory()
289 || !TEST(0, TEST_mem_ne(NULL, 0, NULL, 0)) in test_memory()
290 || !TEST(0, TEST_mem_eq(NULL, 0, "", 0)) in test_memory()
291 || !TEST(0, TEST_mem_eq("", 0, NULL, 0)) in test_memory()
292 || !TEST(0, TEST_mem_ne("", 0, "", 0)) in test_memory()
293 || !TEST(0, TEST_mem_eq("xyz", 3, NULL, 0)) in test_memory()
294 || !TEST(0, TEST_mem_eq("xyz", 3, buf, sizeof(buf))) in test_memory()
295 || !TEST(1, TEST_mem_eq("xyz", 4, buf, sizeof(buf)))) in test_memory()
309 return TEST(0, TEST_mem_eq(p, strlen(p), q, strlen(q))); in test_memory_overflow()
317 if (!TEST(1, TEST_int_eq(BN_dec2bn(&a, "0"), 1)) in test_bignum()
318 || !TEST(1, TEST_BN_eq_word(a, 0)) in test_bignum()
319 || !TEST(0, TEST_BN_eq_word(a, 30)) in test_bignum()
320 || !TEST(1, TEST_BN_abs_eq_word(a, 0)) in test_bignum()
321 || !TEST(0, TEST_BN_eq_one(a)) in test_bignum()
322 || !TEST(1, TEST_BN_eq_zero(a)) in test_bignum()
323 || !TEST(0, TEST_BN_ne_zero(a)) in test_bignum()
324 || !TEST(1, TEST_BN_le_zero(a)) in test_bignum()
325 || !TEST(0, TEST_BN_lt_zero(a)) in test_bignum()
326 || !TEST(1, TEST_BN_ge_zero(a)) in test_bignum()
327 || !TEST(0, TEST_BN_gt_zero(a)) in test_bignum()
328 || !TEST(1, TEST_BN_even(a)) in test_bignum()
329 || !TEST(0, TEST_BN_odd(a)) in test_bignum()
330 || !TEST(1, TEST_BN_eq(b, c)) in test_bignum()
331 || !TEST(0, TEST_BN_eq(a, b)) in test_bignum()
332 || !TEST(0, TEST_BN_ne(NULL, c)) in test_bignum()
333 || !TEST(1, TEST_int_eq(BN_dec2bn(&b, "1"), 1)) in test_bignum()
334 || !TEST(1, TEST_BN_eq_word(b, 1)) in test_bignum()
335 || !TEST(1, TEST_BN_eq_one(b)) in test_bignum()
336 || !TEST(0, TEST_BN_abs_eq_word(b, 0)) in test_bignum()
337 || !TEST(1, TEST_BN_abs_eq_word(b, 1)) in test_bignum()
338 || !TEST(0, TEST_BN_eq_zero(b)) in test_bignum()
339 || !TEST(1, TEST_BN_ne_zero(b)) in test_bignum()
340 || !TEST(0, TEST_BN_le_zero(b)) in test_bignum()
341 || !TEST(0, TEST_BN_lt_zero(b)) in test_bignum()
342 || !TEST(1, TEST_BN_ge_zero(b)) in test_bignum()
343 || !TEST(1, TEST_BN_gt_zero(b)) in test_bignum()
344 || !TEST(0, TEST_BN_even(b)) in test_bignum()
345 || !TEST(1, TEST_BN_odd(b)) in test_bignum()
346 || !TEST(1, TEST_int_eq(BN_dec2bn(&c, "-334739439"), 10)) in test_bignum()
347 || !TEST(0, TEST_BN_eq_word(c, 334739439)) in test_bignum()
348 || !TEST(1, TEST_BN_abs_eq_word(c, 334739439)) in test_bignum()
349 || !TEST(0, TEST_BN_eq_zero(c)) in test_bignum()
350 || !TEST(1, TEST_BN_ne_zero(c)) in test_bignum()
351 || !TEST(1, TEST_BN_le_zero(c)) in test_bignum()
352 || !TEST(1, TEST_BN_lt_zero(c)) in test_bignum()
353 || !TEST(0, TEST_BN_ge_zero(c)) in test_bignum()
354 || !TEST(0, TEST_BN_gt_zero(c)) in test_bignum()
355 || !TEST(0, TEST_BN_even(c)) in test_bignum()
356 || !TEST(1, TEST_BN_odd(c)) in test_bignum()
357 || !TEST(1, TEST_BN_eq(a, a)) in test_bignum()
358 || !TEST(0, TEST_BN_ne(a, a)) in test_bignum()
359 || !TEST(0, TEST_BN_eq(a, b)) in test_bignum()
360 || !TEST(1, TEST_BN_ne(a, b)) in test_bignum()
361 || !TEST(0, TEST_BN_lt(a, c)) in test_bignum()
362 || !TEST(1, TEST_BN_lt(c, b)) in test_bignum()
363 || !TEST(0, TEST_BN_lt(b, c)) in test_bignum()
364 || !TEST(0, TEST_BN_le(a, c)) in test_bignum()
365 || !TEST(1, TEST_BN_le(c, b)) in test_bignum()
366 || !TEST(0, TEST_BN_le(b, c)) in test_bignum()
367 || !TEST(1, TEST_BN_gt(a, c)) in test_bignum()
368 || !TEST(0, TEST_BN_gt(c, b)) in test_bignum()
369 || !TEST(1, TEST_BN_gt(b, c)) in test_bignum()
370 || !TEST(1, TEST_BN_ge(a, c)) in test_bignum()
371 || !TEST(0, TEST_BN_ge(c, b)) in test_bignum()
372 || !TEST(1, TEST_BN_ge(b, c))) in test_bignum()
395 return TEST(0, TEST_str_eq(p, q)) in test_long_output()
396 & TEST(0, TEST_str_eq(q, r)) in test_long_output()
397 & TEST(0, TEST_str_eq(r, s)) in test_long_output()
398 & TEST(0, TEST_mem_eq(r, strlen(r), s, strlen(s))); in test_long_output()
428 && (TEST(0, TEST_BN_eq(a, b)) in test_long_bignum()
429 & TEST(0, TEST_BN_eq(b, a)) in test_long_bignum()
430 & TEST(0, TEST_BN_eq(b, NULL)) in test_long_bignum()
431 & TEST(0, TEST_BN_eq(NULL, a)) in test_long_bignum()
432 & TEST(1, TEST_BN_ne(a, NULL)) in test_long_bignum()
433 & TEST(0, TEST_BN_eq(c, d))); in test_long_bignum()