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()
897 const struct json_test_data *test = &json_test_cases[i]; in json_tests() local
900 root = json_parse(test->json, os_strlen(test->json)); in json_tests()
901 if ((root && !test->tree) || (!root && test->tree)) { in json_tests()
906 if (os_strcmp(buf, test->tree) != 0) { in json_tests()
909 i, buf, test->tree); in json_tests()
1071 struct const_time_fill_msb_test *test; in const_time_tests() local
1073 test = &const_time_fill_msb_tests[i]; in const_time_tests()
1074 if (const_time_fill_msb(test->val) != test->expected) { in const_time_tests()
1077 test->val); in const_time_tests()
1083 struct const_time_is_zero_test *test; in const_time_tests() local
1085 test = &const_time_is_zero_tests[i]; in const_time_tests()
1086 if (const_time_is_zero(test->val) != test->expected) { in const_time_tests()
1089 test->val); in const_time_tests()
1095 struct const_time_eq_test *test; in const_time_tests() local
1097 test = &const_time_eq_tests[i]; in const_time_tests()
1098 if (const_time_eq(test->a, test->b) != test->expected) { in const_time_tests()
1101 test->a, test->b); in const_time_tests()
1104 if (const_time_eq_u8(test->a, test->b) != test->expected_u8) { in const_time_tests()
1107 test->a, test->b); in const_time_tests()
1113 struct const_time_eq_bin_test *test; in const_time_tests() local
1115 test = &const_time_eq_bin_tests[i]; in const_time_tests()
1116 if (const_time_eq_bin(test->a, test->b, test->len) != in const_time_tests()
1117 test->expected) { in const_time_tests()
1120 (unsigned int) test->len); in const_time_tests()
1126 struct const_time_select_test *test; in const_time_tests() local
1128 test = &const_time_select_tests[i]; in const_time_tests()
1129 if (const_time_select(test->mask, test->true_val, in const_time_tests()
1130 test->false_val) != test->expected) { in const_time_tests()
1133 test->mask, test->true_val, test->false_val); in const_time_tests()
1139 struct const_time_select_int_test *test; in const_time_tests() local
1141 test = &const_time_select_int_tests[i]; in const_time_tests()
1142 if (const_time_select_int(test->mask, test->true_val, in const_time_tests()
1143 test->false_val) != test->expected) { in const_time_tests()
1146 test->mask, test->true_val, test->false_val); in const_time_tests()
1152 struct const_time_select_u8_test *test; in const_time_tests() local
1154 test = &const_time_select_u8_tests[i]; in const_time_tests()
1155 if (const_time_select_u8(test->mask, test->true_val, in const_time_tests()
1156 test->false_val) != test->expected) { in const_time_tests()
1159 test->mask, test->true_val, test->false_val); in const_time_tests()
1165 struct const_time_select_s8_test *test; in const_time_tests() local
1167 test = &const_time_select_s8_tests[i]; in const_time_tests()
1168 if (const_time_select_s8(test->mask, test->true_val, in const_time_tests()
1169 test->false_val) != test->expected) { in const_time_tests()
1172 test->mask, test->true_val, test->false_val); in const_time_tests()
1178 struct const_time_select_bin_test *test; in const_time_tests() local
1181 test = &const_time_select_bin_tests[i]; in const_time_tests()
1182 const_time_select_bin(test->mask, test->true_val, in const_time_tests()
1183 test->false_val, test->len, dst); in const_time_tests()
1184 if (os_memcmp(dst, test->expected, test->len) != 0) { in const_time_tests()
1187 test->mask, (unsigned int) test->len); in const_time_tests()
1193 struct const_time_memcmp_test *test; in const_time_tests() local
1196 test = &const_time_memcmp_tests[i]; in const_time_tests()
1197 res = const_time_memcmp(test->a, test->b, test->len); in const_time_tests()
1198 if (res != test->expected) { in const_time_tests()
1201 test->a, test->b, (int) test->len, in const_time_tests()
1202 res, test->expected); in const_time_tests()