]> Cypherpunks repositories - gostls13.git/commitdiff
test new slices
authorRuss Cox <rsc@golang.org>
Thu, 9 Sep 2010 03:48:01 +0000 (23:48 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 9 Sep 2010 03:48:01 +0000 (23:48 -0400)
R=r
CC=golang-dev
https://golang.org/cl/2128047

test/ken/slicearray.go
test/ken/sliceslice.go

index 536bbf56b31c04060565f69a39e776513b58da3f..6e7088e19c0288a65a8c2d85f87ce7ab1bf29485 100644 (file)
@@ -33,12 +33,18 @@ func main() {
        tstb()
        by = bx[lb:]
        tstb()
+       by = bx[:hb]
+       tstb()
        by = bx[0:hb]
        tstb()
        by = bx[0:10]
        tstb()
        by = bx[0:]
        tstb()
+       by = bx[:10]
+       tstb()
+       by = bx[:]
+       tstb()
 
        lb = 2
        hb = 10
@@ -65,6 +71,10 @@ func main() {
        tstb()
        by = bx[0:8]
        tstb()
+       by = bx[:8]
+       tstb()
+       by = bx[:hb]
+       tstb()
 
        lb = 2
        hb = 8
@@ -86,12 +96,18 @@ func main() {
        tstf()
        fy = fx[lb:]
        tstf()
+       fy = fx[:hb]
+       tstf()
        fy = fx[0:hb]
        tstf()
        fy = fx[0:10]
        tstf()
        fy = fx[0:]
        tstf()
+       fy = fx[:10]
+       tstf()
+       fy = fx[:]
+       tstf()
 
        lb = 2
        hb = 10
@@ -114,10 +130,14 @@ func main() {
        tstf()
        fy = fx[lb:8]
        tstf()
+       fy = fx[:hb]
+       tstf()
        fy = fx[0:hb]
        tstf()
        fy = fx[0:8]
        tstf()
+       fy = fx[:8]
+       tstf()
 
        lb = 2
        hb = 8
index 7e7f1b4aca5fc1769ad4be3a1dabffed08831b88..5a35acaf4423d88957ce5997b31a4307ff7bf100 100644 (file)
@@ -24,12 +24,18 @@ func main() {
        tstb()
        by = bx[lb:]
        tstb()
+       by = bx[:hb]
+       tstb()
        by = bx[0:hb]
        tstb()
        by = bx[0:10]
        tstb()
        by = bx[0:]
        tstb()
+       by = bx[:10]
+       tstb()
+       by = bx[:]
+       tstb()
 
        lb = 2
        hb = 10
@@ -56,6 +62,10 @@ func main() {
        tstb()
        by = bx[0:8]
        tstb()
+       by = bx[:8]
+       tstb()
+       by = bx[:hb]
+       tstb()
 
        lb = 2
        hb = 8
@@ -77,12 +87,18 @@ func main() {
        tstf()
        fy = fx[lb:]
        tstf()
+       fy = fx[:hb]
+       tstf()
        fy = fx[0:hb]
        tstf()
        fy = fx[0:10]
        tstf()
        fy = fx[0:]
        tstf()
+       fy = fx[:10]
+       tstf()
+       fy = fx[:]
+       tstf()
 
        lb = 2
        hb = 10
@@ -105,10 +121,14 @@ func main() {
        tstf()
        fy = fx[lb:8]
        tstf()
+       fy = fx[:hb]
+       tstf()
        fy = fx[0:hb]
        tstf()
        fy = fx[0:8]
        tstf()
+       fy = fx[:8]
+       tstf()
 
        lb = 2
        hb = 8