summaryrefslogtreecommitdiff
path: root/test/ken
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2012-02-03 06:29:30 -0800
committerIan Lance Taylor <iant@golang.org>2012-02-03 06:29:30 -0800
commit09137e011356f5c2d2c082d54eb801061b0538fc (patch)
treea6f086cafe849edd4ce9139bb1ae87a4a0bafc3a /test/ken
parent2a0bf071566c57cf0408ee710e4e82bd845bde4b (diff)
downloadgo-09137e011356f5c2d2c082d54eb801061b0538fc.tar.gz
test: test slice beyond len
When slicing a slice, the bounds may be > len as long as they are <= cap. Interestingly, gccgo got that wrong and still passed the testsuite and all the library tests. R=golang-dev, rsc, iant CC=golang-dev http://codereview.appspot.com/5622053
Diffstat (limited to 'test/ken')
-rw-r--r--test/ken/array.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ken/array.go b/test/ken/array.go
index 40209f5da..12694fec6 100644
--- a/test/ken/array.go
+++ b/test/ken/array.go
@@ -68,6 +68,9 @@ func testpdpd() {
a = a[5:25]
res(sumpd(a), 5, 25)
+
+ a = a[30:95]
+ res(sumpd(a), 35, 100)
}
// call ptr fixed with ptr fixed