diff options
Diffstat (limited to 'src/testing/testing_api_cmd_batch.c')
-rw-r--r-- | src/testing/testing_api_cmd_batch.c | 48 |
1 files changed, 4 insertions, 44 deletions
diff --git a/src/testing/testing_api_cmd_batch.c b/src/testing/testing_api_cmd_batch.c index ca23d7fd9..e8f76ca37 100644 --- a/src/testing/testing_api_cmd_batch.c +++ b/src/testing/testing_api_cmd_batch.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014-2018 Taler Systems SA + Copyright (C) 2014-2021 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -113,22 +113,15 @@ batch_cleanup (void *cls, * @param index index number of the object to offer. * @return #GNUNET_OK on success. */ -static int +static enum GNUNET_GenericReturnValue batch_traits (void *cls, const void **ret, const char *trait, unsigned int index) { -#define CURRENT_CMD_INDEX 0 -#define BATCH_INDEX 1 - struct BatchState *bs = cls; - struct TALER_TESTING_Trait traits[] = { - TALER_TESTING_make_trait_cmd - (CURRENT_CMD_INDEX, &bs->batch[bs->batch_ip]), - TALER_TESTING_make_trait_cmd - (BATCH_INDEX, bs->batch), + TALER_TESTING_make_trait_batch_cmds (&bs->batch), TALER_TESTING_trait_end () }; @@ -140,18 +133,6 @@ batch_traits (void *cls, } -/** - * Create a "batch" command. Such command takes a - * end_CMD-terminated array of CMDs and executed them. - * Once it hits the end CMD, it passes the control - * to the next top-level CMD, regardless of it being - * another batch or ordinary CMD. - * - * @param label the command label. - * @param batch array of CMDs to execute. - * - * @return the command. - */ struct TALER_TESTING_Command TALER_TESTING_cmd_batch (const char *label, struct TALER_TESTING_Command *batch) @@ -185,11 +166,6 @@ TALER_TESTING_cmd_batch (const char *label, } -/** - * Advance internal pointer to next command. - * - * @param is interpreter state. - */ void TALER_TESTING_cmd_batch_next (struct TALER_TESTING_Interpreter *is) { @@ -206,23 +182,13 @@ TALER_TESTING_cmd_batch_next (struct TALER_TESTING_Interpreter *is) } -/** - * Test if this command is a batch command. - * - * @return false if not, true if it is a batch command - */ -int +bool TALER_TESTING_cmd_is_batch (const struct TALER_TESTING_Command *cmd) { return cmd->run == &batch_run; } -/** - * Obtain what command the batch is at. - * - * @return cmd current batch command - */ struct TALER_TESTING_Command * TALER_TESTING_cmd_batch_get_current (const struct TALER_TESTING_Command *cmd) { @@ -233,12 +199,6 @@ TALER_TESTING_cmd_batch_get_current (const struct TALER_TESTING_Command *cmd) } -/** - * Set what command the batch should be at. - * - * @param cmd current batch command - * @param new_ip where to move the IP - */ void TALER_TESTING_cmd_batch_set_current (const struct TALER_TESTING_Command *cmd, unsigned int new_ip) |