Lines Matching refs:test

57 		const struct printf_test_data *test = &printf_tests[i];  in printf_encode_decode_tests()  local
58 printf_encode(buf, sizeof(buf), test->data, test->len); in printf_encode_decode_tests()
62 if (binlen != test->len || in printf_encode_decode_tests()
63 os_memcmp(bin, test->data, binlen) != 0) { in printf_encode_decode_tests()
69 binlen = printf_decode(bin, sizeof(bin), test->encoded); in printf_encode_decode_tests()
70 if (binlen != test->len || in printf_encode_decode_tests()
71 os_memcmp(bin, test->data, binlen) != 0) { in printf_encode_decode_tests()
898 const struct json_test_data *test = &json_test_cases[i]; in json_tests() local
901 root = json_parse(test->json, os_strlen(test->json)); in json_tests()
902 if ((root && !test->tree) || (!root && test->tree)) { in json_tests()
907 if (os_strcmp(buf, test->tree) != 0) { in json_tests()
910 i, buf, test->tree); in json_tests()
1072 struct const_time_fill_msb_test *test; in const_time_tests() local
1074 test = &const_time_fill_msb_tests[i]; in const_time_tests()
1075 if (const_time_fill_msb(test->val) != test->expected) { in const_time_tests()
1078 test->val); in const_time_tests()
1084 struct const_time_is_zero_test *test; in const_time_tests() local
1086 test = &const_time_is_zero_tests[i]; in const_time_tests()
1087 if (const_time_is_zero(test->val) != test->expected) { in const_time_tests()
1090 test->val); in const_time_tests()
1096 struct const_time_eq_test *test; in const_time_tests() local
1098 test = &const_time_eq_tests[i]; in const_time_tests()
1099 if (const_time_eq(test->a, test->b) != test->expected) { in const_time_tests()
1102 test->a, test->b); in const_time_tests()
1105 if (const_time_eq_u8(test->a, test->b) != test->expected_u8) { in const_time_tests()
1108 test->a, test->b); in const_time_tests()
1114 struct const_time_eq_bin_test *test; in const_time_tests() local
1116 test = &const_time_eq_bin_tests[i]; in const_time_tests()
1117 if (const_time_eq_bin(test->a, test->b, test->len) != in const_time_tests()
1118 test->expected) { in const_time_tests()
1121 (unsigned int) test->len); in const_time_tests()
1127 struct const_time_select_test *test; in const_time_tests() local
1129 test = &const_time_select_tests[i]; in const_time_tests()
1130 if (const_time_select(test->mask, test->true_val, in const_time_tests()
1131 test->false_val) != test->expected) { in const_time_tests()
1134 test->mask, test->true_val, test->false_val); in const_time_tests()
1140 struct const_time_select_int_test *test; in const_time_tests() local
1142 test = &const_time_select_int_tests[i]; in const_time_tests()
1143 if (const_time_select_int(test->mask, test->true_val, in const_time_tests()
1144 test->false_val) != test->expected) { in const_time_tests()
1147 test->mask, test->true_val, test->false_val); in const_time_tests()
1153 struct const_time_select_u8_test *test; in const_time_tests() local
1155 test = &const_time_select_u8_tests[i]; in const_time_tests()
1156 if (const_time_select_u8(test->mask, test->true_val, in const_time_tests()
1157 test->false_val) != test->expected) { in const_time_tests()
1160 test->mask, test->true_val, test->false_val); in const_time_tests()
1166 struct const_time_select_s8_test *test; in const_time_tests() local
1168 test = &const_time_select_s8_tests[i]; in const_time_tests()
1169 if (const_time_select_s8(test->mask, test->true_val, in const_time_tests()
1170 test->false_val) != test->expected) { in const_time_tests()
1173 test->mask, test->true_val, test->false_val); in const_time_tests()
1179 struct const_time_select_bin_test *test; in const_time_tests() local
1182 test = &const_time_select_bin_tests[i]; in const_time_tests()
1183 const_time_select_bin(test->mask, test->true_val, in const_time_tests()
1184 test->false_val, test->len, dst); in const_time_tests()
1185 if (os_memcmp(dst, test->expected, test->len) != 0) { in const_time_tests()
1188 test->mask, (unsigned int) test->len); in const_time_tests()
1194 struct const_time_memcmp_test *test; in const_time_tests() local
1197 test = &const_time_memcmp_tests[i]; in const_time_tests()
1198 res = const_time_memcmp(test->a, test->b, test->len); in const_time_tests()
1199 if (res != test->expected) { in const_time_tests()
1202 test->a, test->b, (int) test->len, in const_time_tests()
1203 res, test->expected); in const_time_tests()