]> Cypherpunks repositories - gostls13.git/commitdiff
test: move map delete test to nil.go
authorIan Lance Taylor <iant@golang.org>
Thu, 13 Dec 2012 20:11:24 +0000 (12:11 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 13 Dec 2012 20:11:24 +0000 (12:11 -0800)
No need for a separate test for this.

R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/6941045

test/fixedbugs/issue4535.go [deleted file]
test/nil.go

diff --git a/test/fixedbugs/issue4535.go b/test/fixedbugs/issue4535.go
deleted file mode 100644 (file)
index 4511393..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// run
-
-// Copyright 2012 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() {
-       var m map[int]int
-       delete(m, 0)
-}
index 6d90f5053a79d97bfd675a9c7371c1d57dc50d04..44ca79e88ae48a2cf17dd4cd0461be222c5d3a50 100644 (file)
@@ -147,6 +147,9 @@ func maptest() {
                panic(v)
        }
 
+       // can delete (non-existent) entries
+       delete(m, 2)
+
        // but cannot be written to
        shouldPanic(func() {
                m[2] = 3