From ee360ef6bdf7d0246c05802d5227d779106122dc Mon Sep 17 00:00:00 2001 From: Bernhard Urban Date: Thu, 14 Apr 2016 09:24:39 -0700 Subject: [PATCH] benchmarks: fix checksum for `isinst` --- tests/small/isinst.cs | 9 ++++++--- tests/small/isinst.exe | Bin 3584 -> 3584 bytes 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/small/isinst.cs b/tests/small/isinst.cs index d64c46a7..cccf3710 100644 --- a/tests/small/isinst.cs +++ b/tests/small/isinst.cs @@ -19,7 +19,7 @@ public override long foo () { } } - static bool bench (long iterations, object[] objs) { + static long bench (long iterations, object[] objs) { long checksum = 0; for (long i = 0; i < iterations; ++i) { foreach (object o in objs) { @@ -34,7 +34,7 @@ static bool bench (long iterations, object[] objs) { } } } - return checksum == (4 * iterations); + return checksum; } public static void Main (string []args) { @@ -46,6 +46,9 @@ public static void Main (string []args) { objs [3] = new C (); if (args.Length > 0) n = Int64.Parse (args[0]); - System.Environment.Exit (bench (n, objs) ? 0 : 1); + long checksum = bench (n, objs); + Console.WriteLine ("iterations: " + n); + Console.WriteLine ("checksum: " + checksum); + System.Environment.Exit (checksum == (11 * n) ? 0 : 1); } } diff --git a/tests/small/isinst.exe b/tests/small/isinst.exe index c668ee0c8f4909bd46d8695e24c69abd0955d28b..0c3481a94201a7b6868aced533c752c8f7658045 100755 GIT binary patch delta 699 zcmZ8fO=}ZT6g~6i)3Hpe#gDdAn;}MH3L5dN_<;c{Dpsk~Qm7QIG3XdgB#8?_(iBUv zr9$G9F1vD}2oh|6gB#I>AP6G33?hgNH?BM{5hdQ?-FweDcg|xjQ}HW)^_ljv_I$#- z5(CbHkpjMmTF@;6?XtEeXSJC~m70pvJOU=320&d0G-4J@26j@83Rf3+Ag9EFoj`X| z$D;fx&L8h6aO{q?Bsd@Ev>P{=3VkG<|43(G{Y`5!Wzlx?kTTyAH{}IAA@A$kkJU*; z%YaX#2DRu|sSxI_7umv~?~vlg$8eN=m+DWApBZKyA-*O*>pKUPugSBHha?nMx6rUz zRj+v9liXwUbzZ^%XKpw16TFh=jHyf+y_{`C)YLNOkl-8TK%x1qJE$0#Z=%=Q0uB)^ zwrP)B8d}#lbvSt21e;gdHeN3%ozcoG#zNkQtKr^7Zo(bXkK3mOG$*~|@x8HYc({+7TlVrbV u**ZyAmrK_Ejmq%hpFd6YD>3=b>J`6g}V1n>Rk<>7ba(h%?NX;a{^66C9`rDnb!tG=ou!Kt|AoKLjBWJ_(PYV=%OXKHv@PXnU{P~`RAU#g!|HHL`_quiDA zrRX(`%pgG8F$^Mu3ur|*Y?;UEVv)?f^EAfsR$hB|WgxbG#iSy2_s#w4&Y#a?&!-CC ze!Tda2X$qkf{>u%F=!ohCgZ*r1W8tpVrS_2PLv*hC_MWAlijf6tStE*x|Ws4{zIt+ U`_(Z1*XX99YU0dqRmu7P03?xE2mk;8