Commit 9509cbf2 authored by Ian Lance Taylor's avatar Ian Lance Taylor

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
parent b2797f2a
// 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)
}
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment