From 9443c10d7feb0d91323869dd08ec61ca781564f4 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 11 Jan 2020 15:19:56 +0100 Subject: major refactoring, eliminating wire-plugins and moving towards new bank API. main code compiles, testcases known to fail, code sure not to fully work yet --- src/lib/testing_api_trait_string.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'src/lib/testing_api_trait_string.c') diff --git a/src/lib/testing_api_trait_string.c b/src/lib/testing_api_trait_string.c index 8d3d5df04..b9f57ab78 100644 --- a/src/lib/testing_api_trait_string.c +++ b/src/lib/testing_api_trait_string.c @@ -30,7 +30,7 @@ #include "taler_testing_lib.h" #define TALER_TESTING_TRAIT_CONTRACT_TERMS "contract-terms" -#define TALER_TESTING_TRAIT_TRANSFER_SUBJECT "transfer-subject" +#define TALER_TESTING_TRAIT_STRING "string" #define TALER_TESTING_TRAIT_AMOUNT "amount" #define TALER_TESTING_TRAIT_URL "url" #define TALER_TESTING_TRAIT_ORDER_ID "order-id" @@ -80,46 +80,45 @@ TALER_TESTING_make_trait_contract_terms /** - * Obtain a transfer subject from @a cmd. + * Obtain a string from @a cmd. * * @param cmd command to extract the subject from. * @param index index number associated with the transfer * subject to offer. - * @param transfer_subject[out] where to write the offered - * transfer subject. + * @param s[out] where to write the offered + * string * @return #GNUNET_OK on success. */ int -TALER_TESTING_get_trait_transfer_subject +TALER_TESTING_get_trait_string (const struct TALER_TESTING_Command *cmd, unsigned int index, - const char **transfer_subject) + const char **s) { return cmd->traits (cmd->cls, - (const void **) transfer_subject, - TALER_TESTING_TRAIT_TRANSFER_SUBJECT, + (const void **) s, + TALER_TESTING_TRAIT_STRING, index); } /** - * Offer transfer subject. + * Offer string. * * @param index index number associated with the transfer * subject being offered. - * @param transfer_subject transfer subject to offer. - * + * @param s transfer subject to offer. * @return the trait. */ struct TALER_TESTING_Trait -TALER_TESTING_make_trait_transfer_subject +TALER_TESTING_make_trait_string (unsigned int index, - const char *transfer_subject) + const char *s) { struct TALER_TESTING_Trait ret = { .index = index, - .trait_name = TALER_TESTING_TRAIT_TRANSFER_SUBJECT, - .ptr = (const void *) transfer_subject + .trait_name = TALER_TESTING_TRAIT_STRING, + .ptr = (const void *) s }; return ret; } -- cgit v1.2.3