Lines Matching refs:FIELD
350 #define DEFINE_SET_GET_BASE_TEST(PREFIX, SETN, GETN, DUP, FIELD, TYPE, ERR, \ argument
353 execute_CTX_##SETN##_##GETN##_##FIELD(OSSL_CMP_CTX_TEST_FIXTURE *fixture) \
357 (int (*)(CMP_CTX *ctx, TYPE))PREFIX##_##SETN##_##FIELD; \
359 TYPE (*get_fn)(const CMP_CTX *ctx) = OSSL_CMP_CTX_##GETN##_##FIELD; \
486 static int test_CTX_##SETN##_##GETN##_##FIELD(void) \
489 EXECUTE_TEST(execute_CTX_##SETN##_##GETN##_##FIELD, tear_down); \
528 #define DEFINE_SET_GET_TEST(OSSL_CMP, CTX, N, M, DUP, FIELD, TYPE) \ argument
529 DEFINE_SET_GET_BASE_TEST(OSSL_CMP##_##CTX, set##N, get##M, DUP, FIELD, \
532 #define DEFINE_SET_GET_SK_TEST_DEFAULT(OSSL_CMP, CTX, N, M, FIELD, ELEM_TYPE, \ argument
534 DEFINE_SET_GET_BASE_TEST(OSSL_CMP##_##CTX, set##N, get##M, 1, FIELD, \
536 #define DEFINE_SET_GET_SK_TEST(OSSL_CMP, CTX, N, M, FIELD, T) \ argument
537 DEFINE_SET_GET_SK_TEST_DEFAULT(OSSL_CMP, CTX, N, M, FIELD, T, \
544 #define DEFINE_SET_GET_TEST_DEFAULT(OSSL_CMP, CTX, N, M, DUP, FIELD, TYPE, \ argument
546 DEFINE_SET_GET_BASE_TEST(OSSL_CMP##_##CTX, set##N, get##M, DUP, FIELD, \
548 #define DEFINE_SET_TEST_DEFAULT(OSSL_CMP, CTX, N, DUP, FIELD, TYPE, DEFAULT) \ argument
549 static TYPE *OSSL_CMP_CTX_get0_##FIELD(const CMP_CTX *ctx) \
552 return (TYPE *)ctx->FIELD; \
554 DEFINE_SET_GET_TEST_DEFAULT(OSSL_CMP, CTX, N, 0, DUP, FIELD, TYPE, DEFAULT)
555 #define DEFINE_SET_TEST(OSSL_CMP, CTX, N, DUP, FIELD, TYPE) \ argument
556 DEFINE_SET_TEST_DEFAULT(OSSL_CMP, CTX, N, DUP, FIELD, TYPE, IS_0)
558 #define DEFINE_SET_SK_TEST(OSSL_CMP, CTX, N, FIELD, TYPE) \ argument
559 static STACK_OF(TYPE) *OSSL_CMP_CTX_get0_##FIELD(const CMP_CTX *ctx) \
562 return ctx->FIELD; \
564 DEFINE_SET_GET_BASE_TEST(OSSL_CMP##_##CTX, set##N, get0, 1, FIELD, \
571 #define DEFINE_SET_CB_TEST(FIELD) \ argument
572 static OSSL_CMP_##FIELD##_t OSSL_CMP_CTX_get_##FIELD(const CMP_CTX *ctx) \
575 return ctx->FIELD; \
577 DEFINE_SET_GET_BASE_TEST(OSSL_CMP_CTX, set, get, 0, FIELD, \
578 OSSL_CMP_##FIELD##_t, NULL, IS_0, \
579 test_##FIELD, DROP)
580 #define DEFINE_SET_GET_P_VOID_TEST(FIELD) \ argument
581 DEFINE_SET_GET_BASE_TEST(OSSL_CMP_CTX, set, get, 0, FIELD, void *, \
584 #define DEFINE_SET_GET_INT_TEST_DEFAULT(OSSL_CMP, CTX, FIELD, DEFAULT) \ argument
585 DEFINE_SET_GET_BASE_TEST(OSSL_CMP##_##CTX, set, get, 0, FIELD, int, -1, \
587 #define DEFINE_SET_GET_INT_TEST(OSSL_CMP, CTX, FIELD) \ argument
588 DEFINE_SET_GET_INT_TEST_DEFAULT(OSSL_CMP, CTX, FIELD, IS_NEG)
589 #define DEFINE_SET_INT_TEST(FIELD) \ argument
590 static int OSSL_CMP_CTX_get_##FIELD(const CMP_CTX *ctx) \
593 return ctx->FIELD; \
595 DEFINE_SET_GET_INT_TEST_DEFAULT(OSSL_CMP, CTX, FIELD, IS_0)
597 #define DEFINE_SET_GET_ARG_FN(SETN, GETN, FIELD, ARG, T) \ argument
598 static int OSSL_CMP_CTX_##SETN##_##FIELD##_##ARG(CMP_CTX *ctx, T val) \
600 return OSSL_CMP_CTX_##SETN##_##FIELD(ctx, ARG, val); \
603 static T OSSL_CMP_CTX_##GETN##_##FIELD##_##ARG(const CMP_CTX *ctx) \
605 return OSSL_CMP_CTX_##GETN##_##FIELD(ctx, ARG); \
608 #define DEFINE_SET_GET1_STR_FN(SETN, FIELD) \ argument
609 static int OSSL_CMP_CTX_##SETN##_##FIELD##_str(CMP_CTX *ctx, char *val)\
611 return OSSL_CMP_CTX_##SETN##_##FIELD(ctx, (unsigned char *)val, \
615 static char *OSSL_CMP_CTX_get1_##FIELD##_str(const CMP_CTX *ctx) \
620 bytes = ctx->FIELD; \
628 #define DEFINE_PUSH_BASE_TEST(PUSHN, DUP, FIELD, ELEM, TYPE, T, \ argument
630 static TYPE sk_top_##FIELD(const CMP_CTX *ctx) \
632 return sk_##T##_value(ctx->FIELD, sk_##T##_num(ctx->FIELD) - 1); \
643 int n_elem = sk_##T##_num(ctx->FIELD); \
663 field_read = ctx->FIELD; \
675 if (sk_##T##_num(ctx->FIELD) != ++n_elem) { \
679 val1_read = sk_top_##FIELD(ctx); \
699 if (sk_##T##_num(ctx->FIELD) != ++n_elem) { \
703 val2_read = sk_top_##FIELD(ctx); \
736 #define DEFINE_PUSH_TEST(N, DUP, FIELD, ELEM, TYPE) \ argument
737 DEFINE_PUSH_BASE_TEST(push##N, DUP, FIELD, ELEM, TYPE *, TYPE, \