summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-05-01 10:24:28 -0700
committerOri Bernstein <ori@eigenstate.org>2018-05-01 10:27:04 -0700
commit1ac88fcd0d2f000dac2119cf52e3bd7c60200b96 (patch)
tree5692024b1e3478c4a0fe683bc85c22b335cab4af /lib
parente1bfd3ee239d17bd45b7cc2caa671a91e0774304 (diff)
downloadmc-1ac88fcd0d2f000dac2119cf52e3bd7c60200b96.tar.gz
Escape test failures.
This makes things work more good when running tests by hand.
Diffstat (limited to 'lib')
-rw-r--r--lib/testr/testr.myr14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/testr/testr.myr b/lib/testr/testr.myr
index 9d8c55f..4a087f3 100644
--- a/lib/testr/testr.myr
+++ b/lib/testr/testr.myr
@@ -59,14 +59,24 @@ const check = {ctx, cond, msg, args
}
generic eq = {ctx, a, b
+ var b0 : byte[128]
+ var b1 : byte[128]
+
if !std.eq(a, b)
- fail(ctx, "{} != {}\n", a, b)
+ fail(ctx, "{e} != {e}\n",
+ std.bfmt(b0[:], "{}", a),
+ std.bfmt(b1[:], "{}", b))
;;
}
generic neq = {ctx, a, b
+ var b0 : byte[128]
+ var b1 : byte[128]
+
if std.eq(a, b)
- fail(ctx, "{} != {}\n", a, b)
+ fail(ctx, "{e} != {e}\n",
+ std.bfmt(b0[:], "{}", a),
+ std.bfmt(b1[:], "{}", b))
;;
}