shithub: mc

Download patch

ref: cd9b841faedd7d142dc43993ad78918ee8ed1fe6
parent: 5cd0a14dc99289449cd8a3a5bd39fb1bdad21662
author: Ori Bernstein <ori@eigenstate.org>
date: Wed Feb 10 06:35:06 EST 2016

Print bad indexes in iterutil test

    Easier for debugging.

--- a/lib/std/test/iterutil.myr
+++ b/lib/std/test/iterutil.myr
@@ -5,15 +5,15 @@
 
 	n = 0
 	for (x, i) in std.byenum([0,2,4,6,8][:])
-		std.assert(x == n, "invalid enum idx")
-		std.assert(i == n*2, "invalid enum val")
+		std.assert(x == n, "invalid enum idx {}", x)
+		std.assert(i == n*2, "invalid enum val {}", i)
 		n++
 	;;
 
 	n = 0
 	for (a, b) in std.byzip([0,2,4,6,8][:], [2,4][:])
-		std.assert(a == n*2, "invalid val from a")
-		std.assert(b == n*2 + 2, "invalid val from b")
+		std.assert(a == n*2, "invalid val from a: {}", a)
+		std.assert(b == n*2 + 2, "invalid val from b: {}", b)
 		n++
 	;;
 }