]> Cypherpunks repositories - gostls13.git/commitdiff
new test - map failure
authorRob Pike <r@golang.org>
Sat, 28 Jun 2008 18:38:07 +0000 (11:38 -0700)
committerRob Pike <r@golang.org>
Sat, 28 Jun 2008 18:38:07 +0000 (11:38 -0700)
SVN=125258

test/bugs/bug060.go [new file with mode: 0644]
test/golden.out

diff --git a/test/bugs/bug060.go b/test/bugs/bug060.go
new file mode 100644 (file)
index 0000000..5afdb48
--- /dev/null
@@ -0,0 +1,17 @@
+// $G $D/$F.go && $L $F.$A && ./$A.out
+
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func main() {
+       m := new(map[int]int);
+       m[0] = 0;
+       m[0]++;
+       if m[0] != 1 {
+               print "map does not increment";
+               sys.exit(1)
+       }
+}
index bb52205ff358651e8db32bf060aabf8ce63ec285..0e1a8c6c045b8076a2830210ee33d1282607dcd7 100644 (file)
@@ -309,6 +309,9 @@ BUG: compilation should succeed
 =========== bugs/bug059.go
 BUG: crashes
 
+=========== bugs/bug060.go
+BUG: crashes
+
 =========== fixedbugs/bug000.go
 
 =========== fixedbugs/bug001.go