summaryrefslogtreecommitdiff
path: root/src/bank-lib/test_bank_interpreter.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-05-11 11:22:42 +0200
committerChristian Grothoff <christian@grothoff.org>2017-05-11 11:22:42 +0200
commit5a0ee21b48eb605aca28c2d5d9bea80795e4c927 (patch)
tree45e70087c475029647b5c71d6e5503f8e6d9e2d8 /src/bank-lib/test_bank_interpreter.c
parentd5ddbb648c4589a841356b3f20eb5a87787d958d (diff)
downloadexchange-5a0ee21b48eb605aca28c2d5d9bea80795e4c927.tar.gz
exchange-5a0ee21b48eb605aca28c2d5d9bea80795e4c927.tar.bz2
exchange-5a0ee21b48eb605aca28c2d5d9bea80795e4c927.zip
even more detailed /history error reporting
Diffstat (limited to 'src/bank-lib/test_bank_interpreter.c')
-rw-r--r--src/bank-lib/test_bank_interpreter.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/bank-lib/test_bank_interpreter.c b/src/bank-lib/test_bank_interpreter.c
index bf797f2c..c53d53a5 100644
--- a/src/bank-lib/test_bank_interpreter.c
+++ b/src/bank-lib/test_bank_interpreter.c
@@ -351,7 +351,7 @@ print_expected (struct History *h,
off,
(unsigned long long) h_len);
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Expected history\n");
+ "Expected history:\n");
for (uint64_t i=0;i<h_len;i++)
{
char *acc;
@@ -553,7 +553,19 @@ history_cb (void *cls,
(GNUNET_YES ==
cmd->details.history.failed) )
{
+ uint64_t total;
+ struct History *h;
GNUNET_break (0);
+
+ total = build_history (is,
+ &h);
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Expected history of length %llu, got %llu\n",
+ (unsigned long long) total,
+ (unsigned long long) cmd->details.history.results_obtained);
+ print_expected (h, total, UINT_MAX);
+ free_history (h,
+ total);
fail (is);
return;
}