shithub: mc

Download patch

ref: 80e1f20064f435fba7b4c7be70fd6b19c5218cc3
parent: 9fef96e3fc0e48ed435bda6345c0a50b1876a436
author: Ori Bernstein <ori@markovcorp.com>
date: Tue Jul 18 07:04:09 EDT 2017

Update hashes in tests to match fixed algorithm.

--- a/lib/std/test/bitset.myr
+++ b/lib/std/test/bitset.myr
@@ -49,11 +49,11 @@
 		}],
 		[.name="hash", .fn={ctx
 			var bs = mkset([][:])
-			testr.check(ctx, std.bshash(bs) == 493832887, "wrong hash, expected {}", std.bshash(bs))
+			testr.check(ctx, std.bshash(bs) == 2580988821, "wrong hash, got {}", std.bshash(bs))
 			std.bsput(bs, 123456)
-			testr.check(ctx, std.bshash(bs) == 746495367, "wrong hash, expected {}", std.bshash(bs))
+			testr.check(ctx, std.bshash(bs) == 2020624217, "wrong hash, got {}", std.bshash(bs))
 			std.bsdel(bs, 123456)
-			testr.check(ctx, std.bshash(bs) == 493832887, "wrong hash, expected {}", std.bshash(bs))
+			testr.check(ctx, std.bshash(bs) == 2580988821, "wrong hash, got {}", std.bshash(bs))
 			std.bsfree(bs)
 		}]
 	][:])
--- a/lib/std/test/hashfuncs.myr
+++ b/lib/std/test/hashfuncs.myr
@@ -15,7 +15,7 @@
 	std.assert(std.ptreq(&x, &x), "equal pointers not equal")
 	std.assert(!std.ptreq(&x, &y), "unequal pointers are equal")
 
-	std.assert(std.inthash(123) == 2379201998, "wrong int hash")
+	std.assert(std.inthash(123) == 3497506805, "wrong int hash")
 	std.assert(std.inteq(123, 123), "equal integers not equal")
 	std.assert(!std.inteq(123, 456), "unequal integers are equal")