Lines Matching refs:n
195 static int test_param_int(int n) in test_param_int() argument
199 const size_t len = raw_values[n].len >= sizeof(int) ? in test_param_int()
200 sizeof(int) : raw_values[n].len; in test_param_int()
207 le_copy(buf, sizeof(in), raw_values[n].value, sizeof(in)); in test_param_int()
213 if (!TEST_mem_eq(cmp, len, raw_values[n].value, len)) in test_param_int()
219 if (!TEST_mem_eq(cmp, sizeof(in), raw_values[n].value, sizeof(in))) in test_param_int()
222 return test_param_type_extra(¶m, raw_values[n].value, sizeof(int)); in test_param_int()
225 static int test_param_long(int n) in test_param_long() argument
229 const size_t len = raw_values[n].len >= sizeof(long int) in test_param_long()
230 ? sizeof(long int) : raw_values[n].len; in test_param_long()
237 le_copy(buf, sizeof(in), raw_values[n].value, sizeof(in)); in test_param_long()
243 if (!TEST_mem_eq(cmp, len, raw_values[n].value, len)) in test_param_long()
249 if (!TEST_mem_eq(cmp, sizeof(in), raw_values[n].value, sizeof(in))) in test_param_long()
252 return test_param_type_extra(¶m, raw_values[n].value, sizeof(long int)); in test_param_long()
255 static int test_param_uint(int n) in test_param_uint() argument
259 …const size_t len = raw_values[n].len >= sizeof(unsigned int) ? sizeof(unsigned int) : raw_values[n… in test_param_uint()
266 le_copy(buf, sizeof(in), raw_values[n].value, sizeof(in)); in test_param_uint()
272 if (!TEST_mem_eq(cmp, len, raw_values[n].value, len)) in test_param_uint()
278 if (!TEST_mem_eq(cmp, sizeof(in), raw_values[n].value, sizeof(in))) in test_param_uint()
281 return test_param_type_extra(¶m, raw_values[n].value, sizeof(unsigned int)); in test_param_uint()
284 static int test_param_ulong(int n) in test_param_ulong() argument
288 const size_t len = raw_values[n].len >= sizeof(unsigned long int) in test_param_ulong()
289 ? sizeof(unsigned long int) : raw_values[n].len; in test_param_ulong()
296 le_copy(buf, sizeof(in), raw_values[n].value, sizeof(in)); in test_param_ulong()
302 if (!TEST_mem_eq(cmp, len, raw_values[n].value, len)) in test_param_ulong()
308 if (!TEST_mem_eq(cmp, sizeof(in), raw_values[n].value, sizeof(in))) in test_param_ulong()
311 return test_param_type_extra(¶m, raw_values[n].value, sizeof(unsigned long int)); in test_param_ulong()
314 static int test_param_int32(int n) in test_param_int32() argument
318 const size_t len = raw_values[n].len >= sizeof(int32_t) in test_param_int32()
319 ? sizeof(int32_t) : raw_values[n].len; in test_param_int32()
326 le_copy(buf, sizeof(in), raw_values[n].value, sizeof(in)); in test_param_int32()
332 if (!TEST_mem_eq(cmp, len, raw_values[n].value, len)) in test_param_int32()
338 if (!TEST_mem_eq(cmp, sizeof(in), raw_values[n].value, sizeof(in))) in test_param_int32()
341 return test_param_type_extra(¶m, raw_values[n].value, sizeof(int32_t)); in test_param_int32()
344 static int test_param_uint32(int n) in test_param_uint32() argument
348 const size_t len = raw_values[n].len >= sizeof(uint32_t) in test_param_uint32()
349 ? sizeof(uint32_t) : raw_values[n].len; in test_param_uint32()
356 le_copy(buf, sizeof(in), raw_values[n].value, sizeof(in)); in test_param_uint32()
362 if (!TEST_mem_eq(cmp, len, raw_values[n].value, len)) in test_param_uint32()
368 if (!TEST_mem_eq(cmp, sizeof(in), raw_values[n].value, sizeof(in))) in test_param_uint32()
371 return test_param_type_extra(¶m, raw_values[n].value, sizeof(uint32_t)); in test_param_uint32()
374 static int test_param_int64(int n) in test_param_int64() argument
378 const size_t len = raw_values[n].len >= sizeof(int64_t) in test_param_int64()
379 ? sizeof(int64_t) : raw_values[n].len; in test_param_int64()
386 le_copy(buf, sizeof(in), raw_values[n].value, sizeof(in)); in test_param_int64()
392 if (!TEST_mem_eq(cmp, len, raw_values[n].value, len)) in test_param_int64()
398 if (!TEST_mem_eq(cmp, sizeof(in), raw_values[n].value, sizeof(in))) in test_param_int64()
401 return test_param_type_extra(¶m, raw_values[n].value, sizeof(int64_t)); in test_param_int64()
404 static int test_param_uint64(int n) in test_param_uint64() argument
408 const size_t len = raw_values[n].len >= sizeof(uint64_t) in test_param_uint64()
409 ? sizeof(uint64_t) : raw_values[n].len; in test_param_uint64()
416 le_copy(buf, sizeof(in), raw_values[n].value, sizeof(in)); in test_param_uint64()
422 if (!TEST_mem_eq(cmp, len, raw_values[n].value, len)) in test_param_uint64()
428 if (!TEST_mem_eq(cmp, sizeof(in), raw_values[n].value, sizeof(in))) in test_param_uint64()
431 return test_param_type_extra(¶m, raw_values[n].value, sizeof(uint64_t)); in test_param_uint64()
434 static int test_param_size_t(int n) in test_param_size_t() argument
438 const size_t len = raw_values[n].len >= sizeof(size_t) in test_param_size_t()
439 ? sizeof(size_t) : raw_values[n].len; in test_param_size_t()
446 le_copy(buf, sizeof(in), raw_values[n].value, sizeof(in)); in test_param_size_t()
452 if (!TEST_mem_eq(cmp, len, raw_values[n].value, len)) in test_param_size_t()
458 if (!TEST_mem_eq(cmp, sizeof(in), raw_values[n].value, sizeof(in))) in test_param_size_t()
461 return test_param_type_extra(¶m, raw_values[n].value, sizeof(size_t)); in test_param_size_t()
464 static int test_param_time_t(int n) in test_param_time_t() argument
468 const size_t len = raw_values[n].len >= sizeof(time_t) in test_param_time_t()
469 ? sizeof(time_t) : raw_values[n].len; in test_param_time_t()
476 le_copy(buf, sizeof(in), raw_values[n].value, sizeof(in)); in test_param_time_t()
482 if (!TEST_mem_eq(cmp, len, raw_values[n].value, len)) in test_param_time_t()
488 if (!TEST_mem_eq(cmp, sizeof(in), raw_values[n].value, sizeof(in))) in test_param_time_t()
491 return test_param_type_extra(¶m, raw_values[n].value, sizeof(size_t)); in test_param_time_t()
494 static int test_param_bignum(int n) in test_param_bignum() argument
497 const size_t len = raw_values[n].len; in test_param_bignum()
509 if (!TEST_ptr(b = BN_lebin2bn(raw_values[n].value, (int)len, NULL))) in test_param_bignum()
515 if (!TEST_mem_eq(raw_values[n].value, len, buf, len)) in test_param_bignum()
529 static int test_param_signed_bignum(int n) in test_param_signed_bignum() argument
532 const size_t len = raw_values[n].len; in test_param_signed_bignum()
543 if (!TEST_ptr(b = BN_signed_lebin2bn(raw_values[n].value, (int)len, NULL))) in test_param_signed_bignum()
547 if (!TEST_false(!!(raw_values[n].value[len - 1] & 0x80) ^ BN_is_negative(b))) in test_param_signed_bignum()
552 if (!TEST_mem_eq(raw_values[n].value, len, buf, len)) in test_param_signed_bignum()
602 int i, n = 0, ret = 0; in test_param_construct() local
614 params[n++] = OSSL_PARAM_construct_int("int", &i); in test_param_construct()
615 params[n++] = OSSL_PARAM_construct_uint("uint", &u); in test_param_construct()
616 params[n++] = OSSL_PARAM_construct_long("long", &l); in test_param_construct()
617 params[n++] = OSSL_PARAM_construct_ulong("ulong", &ul); in test_param_construct()
618 params[n++] = OSSL_PARAM_construct_int32("int32", &i32); in test_param_construct()
619 params[n++] = OSSL_PARAM_construct_int64("int64", &i64); in test_param_construct()
620 params[n++] = OSSL_PARAM_construct_uint32("uint32", &u32); in test_param_construct()
621 params[n++] = OSSL_PARAM_construct_uint64("uint64", &u64); in test_param_construct()
622 params[n++] = OSSL_PARAM_construct_size_t("size_t", &s); in test_param_construct()
623 params[n++] = OSSL_PARAM_construct_double("double", &d); in test_param_construct()
624 params[n++] = OSSL_PARAM_construct_BN("bignum", ubuf, sizeof(ubuf)); in test_param_construct()
625 params[n++] = OSSL_PARAM_construct_utf8_string("utf8str", buf, sizeof(buf)); in test_param_construct()
626 params[n++] = OSSL_PARAM_construct_octet_string("octstr", buf, sizeof(buf)); in test_param_construct()
627 params[n++] = OSSL_PARAM_construct_utf8_ptr("utf8ptr", &bufp, 0); in test_param_construct()
628 params[n++] = OSSL_PARAM_construct_octet_ptr("octptr", &vp, 0); in test_param_construct()
629 params[n] = OSSL_PARAM_construct_end(); in test_param_construct()