summaryrefslogtreecommitdiff
path: root/test/235.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2008-09-16 14:03:43 -0700
committerRob Pike <r@golang.org>2008-09-16 14:03:43 -0700
commitb326698aa7408a47f36489ac7f22e5360f53001e (patch)
tree29c2b94a2268497977bc254699c873bd2e8d2e22 /test/235.go
parent71411c4ff467bcdd22d77f26f8923468f6093df4 (diff)
downloadgo-b326698aa7408a47f36489ac7f22e5360f53001e.tar.gz
fix some broken tests (tests themselves were wrong)
R=gri,rsc OCL=15310 CL=15402
Diffstat (limited to 'test/235.go')
-rw-r--r--test/235.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/235.go b/test/235.go
index 48bf60197..c5287767c 100644
--- a/test/235.go
+++ b/test/235.go
@@ -34,6 +34,14 @@ func min(xs *[]uint64) uint64 {
func main() {
F := []uint64{2, 3, 5};
const n = len(F);
+ OUT := []uint64{
+ 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 25, 27, 30, 32, 36,
+ 40, 45, 48, 50, 54, 60, 64, 72, 75, 80, 81, 90, 96, 100, 108, 120, 125,
+ 128, 135, 144, 150, 160, 162, 180, 192, 200, 216, 225, 240, 243, 250,
+ 256, 270, 288, 300, 320, 324, 360, 375, 384, 400, 405, 432, 450, 480,
+ 486, 500, 512, 540, 576, 600, 625, 640, 648, 675, 720, 729, 750, 768,
+ 800, 810, 864, 900, 960, 972, 1000, 1024, 1080, 1125, 1152, 1200, 1215,
+ 1250, 1280, 1296, 1350, 1440, 1458, 1500, 1536, 1600 };
x := uint64(1);
ins := new([]*T, n);
@@ -44,7 +52,7 @@ func main() {
xs[i] = x;
}
- for i := 0; i < 100; i++ {
+ for i := 0; i < len(OUT); i++ {
t := min(xs);
for i := 0; i < n; i++ {
ins[i] -< x;
@@ -55,7 +63,7 @@ func main() {
}
x = min(xs);
- print(x, "\n");
+ if x != OUT[i] { panic("bad: ", x, " should be ", OUT[i]); }
}
sys.exit(0);
}