From: Ian Lance Taylor Date: Thu, 13 Dec 2012 20:11:24 +0000 (-0800) Subject: test: move map delete test to nil.go X-Git-Tag: go1.1rc2~1633 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=9509cbf203dbdf39008c238c96563c11b942d7ba;p=gostls13.git test: move map delete test to nil.go No need for a separate test for this. R=golang-dev, minux.ma, rsc CC=golang-dev https://golang.org/cl/6941045 --- diff --git a/test/fixedbugs/issue4535.go b/test/fixedbugs/issue4535.go deleted file mode 100644 index 4511393569..0000000000 --- a/test/fixedbugs/issue4535.go +++ /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) -} diff --git a/test/nil.go b/test/nil.go index 6d90f5053a..44ca79e88a 100644 --- a/test/nil.go +++ b/test/nil.go @@ -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