diff options
author | priscilla <priscilla.huang@efrei.net> | 2023-03-29 10:09:28 -0400 |
---|---|---|
committer | priscilla <priscilla.huang@efrei.net> | 2023-03-29 10:09:28 -0400 |
commit | 8e104cfe8a419099e36a8c992f5523e2f0852aee (patch) | |
tree | 01d7da28fbe6747784ca6547f6e91882bb367067 | |
parent | ed3003dd83612628effa105a798f376def2fd33b (diff) |
pull
-rw-r--r-- | src/testing/testing_api_cmd_get_template.c | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/src/testing/testing_api_cmd_get_template.c b/src/testing/testing_api_cmd_get_template.c index 412c52c0..3866d6fa 100644 --- a/src/testing/testing_api_cmd_get_template.c +++ b/src/testing/testing_api_cmd_get_template.c @@ -115,48 +115,26 @@ get_template_cb (void *cls, } { const char **expected_pos_key; - const char *pos_key = tgr->details.success.pos_key; if (GNUNET_OK != TALER_TESTING_get_trait_template_pos_key (template_cmd, &expected_pos_key)) TALER_TESTING_interpreter_fail (gis->is); - if ( ( (NULL == pos_key) && (NULL != *expected_pos_key)) || - ( (NULL != pos_key) && (NULL == *expected_pos_key)) || - ( (NULL != pos_key) && - (0 != strcmp (pos_key, + if ( ( (NULL == tgr->details.success.pos_key) && (NULL != *expected_pos_key)) || + ( (NULL != tgr->details.success.pos_key) && (NULL == *expected_pos_key)) || + ( (NULL != tgr->details.success.pos_key) && + (0 != strcmp (tgr->details.success.pos_key, *expected_pos_key)) ) ) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Template pos_key `%s' does not match `%s'\n", - pos_key, + tgr->details.success.pos_key, *expected_pos_key); TALER_TESTING_interpreter_fail (gis->is); return; } } { - const enum TALER_MerchantConfirmationAlgorithm *expected_pos_alg; - const enum TALER_MerchantConfirmationAlgorithm pos_alg = tgr->details.success.pos_alg; - - if (GNUNET_OK != - TALER_TESTING_get_trait_template_pos_alg (template_cmd, - &expected_pos_alg)) - TALER_TESTING_interpreter_fail (gis->is); - if ( ( (0 == pos_alg) && (0 != *expected_pos_alg)) || - ( (0 != pos_alg) && (0 == *expected_pos_alg)) || - ( (0 != pos_alg) && - (pos_alg != *expected_pos_alg)) ) - { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Template pos_alg `%d' does not match `%d'\n", - pos_alg, - *expected_pos_alg); - TALER_TESTING_interpreter_fail (gis->is); - return; - } - } - { const json_t *expected_template_contract; if (GNUNET_OK != |