summaryrefslogtreecommitdiff
path: root/src/include/taler_merchant_testing_lib.h
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-05-09 16:01:54 +0200
committerMarcello Stanisci <stanisci.m@gmail.com>2018-05-09 16:01:54 +0200
commitd30f4e1d34dd993ca0d32b08483e18095e196a18 (patch)
tree540b5e83f52a656bd526e9d73a97b969908ab543 /src/include/taler_merchant_testing_lib.h
parent323c183899060762f6c812041ddb20e28846f5f1 (diff)
downloadmerchant-d30f4e1d34dd993ca0d32b08483e18095e196a18.tar.gz
merchant-d30f4e1d34dd993ca0d32b08483e18095e196a18.tar.bz2
merchant-d30f4e1d34dd993ca0d32b08483e18095e196a18.zip
Introducing "rewind" CMD.
It allows one to point to the next desired CMD to execute into the interpreter.
Diffstat (limited to 'src/include/taler_merchant_testing_lib.h')
-rw-r--r--src/include/taler_merchant_testing_lib.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/include/taler_merchant_testing_lib.h b/src/include/taler_merchant_testing_lib.h
index 8394fc44..304a16be 100644
--- a/src/include/taler_merchant_testing_lib.h
+++ b/src/include/taler_merchant_testing_lib.h
@@ -581,5 +581,23 @@ TALER_TESTING_cmd_tip_pickup
const char **amounts,
struct TALER_EXCHANGE_Handle *exchange);
+/**
+ * Make the instruction pointer point to @a new_ip
+ * only if @a counter is greater than zero.
+ *
+ * @param label command label
+ * @param new_ip new instruction pointer's value. Note that,
+ * when the next instruction will be called, the interpreter
+ * will increment the ip under the hood so this value must be
+ * set to the index of the instruction we want to execute next
+ * MINUS one.
+ * @param counter counts how many times the rewinding has
+ * to happen.
+ */
+struct TALER_TESTING_Command
+TALER_TESTING_cmd_rewind_ip
+ (const char *label,
+ int new_ip,
+ unsigned int *counter);
#endif