From: Ian Lance Taylor Date: Fri, 3 Feb 2012 14:29:30 +0000 (-0800) Subject: test: test slice beyond len X-Git-Tag: weekly.2012-02-07~101 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=450c955bd973f153ba99c340022a424be5c75f73;p=gostls13.git 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 https://golang.org/cl/5622053 --- diff --git a/test/ken/array.go b/test/ken/array.go index 40209f5da3..12694fec62 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