summaryrefslogtreecommitdiff
path: root/src/backenddb
diff options
context:
space:
mode:
authorJonathan Buchanan <jonathan.russ.buchanan@gmail.com>2020-07-04 00:31:12 -0400
committerJonathan Buchanan <jonathan.russ.buchanan@gmail.com>2020-07-04 00:31:12 -0400
commit74e6cc62b8cf935d485d93a578a92615718d2e51 (patch)
tree83b8cda5cf19b44cc7278339093f0e1d4212a247 /src/backenddb
parent33d332a637d77524f140a20c0b636177276224a9 (diff)
downloadmerchant-74e6cc62b8cf935d485d93a578a92615718d2e51.tar.gz
merchant-74e6cc62b8cf935d485d93a578a92615718d2e51.tar.bz2
merchant-74e6cc62b8cf935d485d93a578a92615718d2e51.zip
fix compiler warnings for test_merchantdb.c
Diffstat (limited to 'src/backenddb')
-rw-r--r--src/backenddb/test_merchantdb.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/src/backenddb/test_merchantdb.c b/src/backenddb/test_merchantdb.c
index 6ee6a417..cf3fa582 100644
--- a/src/backenddb/test_merchantdb.c
+++ b/src/backenddb/test_merchantdb.c
@@ -3234,11 +3234,11 @@ make_transfer (const struct ExchangeSignkeyData *signkey,
details[i].coin_pub = deposits[i].coin_pub;
details[i].coin_value = deposits[i].amount_with_fee;
details[i].coin_fee = deposits[i].deposit_fee;
- GNUNET_assert (GNUNET_OK ==
+ GNUNET_assert (0 <=
TALER_amount_add (&transfer->data.total_amount,
&transfer->data.total_amount,
&deposits[i].amount_with_fee));
- GNUNET_assert (GNUNET_OK ==
+ GNUNET_assert (0 <=
TALER_amount_add (&transfer->deposit_fee,
&transfer->deposit_fee,
&deposits[i].deposit_fee));
@@ -3283,9 +3283,9 @@ test_lookup_transfer (const struct TransferData *transfer)
"Lookup transfer failed\n");
return 1;
}
- GNUNET_assert (GNUNET_OK == TALER_amount_add (&total_with_fee,
- &transfer->data.total_amount,
- &transfer->data.wire_fee));
+ GNUNET_assert (0 <= TALER_amount_add (&total_with_fee,
+ &transfer->data.total_amount,
+ &transfer->data.wire_fee));
if ((GNUNET_OK != TALER_amount_cmp_currency (&total_with_fee,
&total)) ||
(0 != TALER_amount_cmp (&total_with_fee,
@@ -4648,17 +4648,18 @@ test_lookup_tip_details (const struct InstanceData *instance,
unsigned int pickups_length;
struct TALER_MERCHANTDB_PickupDetails *pickups = NULL;
unsigned int results_matching[expected_pickups_length];
- if (TALER_EC_NONE != plugin->lookup_tip_details (plugin->cls,
- instance->instance.id,
- &tip->details.tip_id,
- true,
- &total_authorized,
- &total_picked_up,
- &justification,
- &expiration,
- &reserve_pub,
- &pickups_length,
- &pickups))
+ if (0 >
+ plugin->lookup_tip_details (plugin->cls,
+ instance->instance.id,
+ &tip->details.tip_id,
+ true,
+ &total_authorized,
+ &total_picked_up,
+ &justification,
+ &expiration,
+ &reserve_pub,
+ &pickups_length,
+ &pickups))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Lookup tip details failed\n");
@@ -5707,7 +5708,7 @@ run_test_refunds (struct TestRefunds_Closure *cls)
GNUNET_assert (GNUNET_OK ==
TALER_string_to_amount ("EUR:1000.00",
&inc));
- TEST_COND_RET_ON_FAIL (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
+ TEST_COND_RET_ON_FAIL (TALER_MERCHANTDB_RS_TOO_HIGH ==
plugin->increase_refund (plugin->cls,
cls->instance.instance.id,
cls->order.id,
@@ -5718,7 +5719,7 @@ run_test_refunds (struct TestRefunds_Closure *cls)
GNUNET_assert (GNUNET_OK ==
TALER_string_to_amount ("EUR:1.00",
&inc));
- TEST_COND_RET_ON_FAIL (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT ==
+ TEST_COND_RET_ON_FAIL (TALER_MERCHANTDB_RS_SUCCESS ==
plugin->increase_refund (plugin->cls,
cls->instance.instance.id,
cls->order.id,