aboutsummaryrefslogtreecommitdiff
path: root/test/nil.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2012-12-13 12:11:24 -0800
committerIan Lance Taylor <iant@golang.org>2012-12-13 12:11:24 -0800
commit9509cbf203dbdf39008c238c96563c11b942d7ba (patch)
tree199110fd326c1479b7872feecddec4470ed1f874 /test/nil.go
parentb2797f2ae09680eafe4359fc7c014ef35d27ccdc (diff)
downloadgo-9509cbf203dbdf39008c238c96563c11b942d7ba.tar.gz
go-9509cbf203dbdf39008c238c96563c11b942d7ba.zip
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
Diffstat (limited to 'test/nil.go')
-rw-r--r--test/nil.go3
1 files changed, 3 insertions, 0 deletions
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