]> Cypherpunks.ru repositories - gostls13.git/commitdiff
test for new string bug
authorRuss Cox <rsc@golang.org>
Fri, 10 Apr 2009 13:22:41 +0000 (06:22 -0700)
committerRuss Cox <rsc@golang.org>
Fri, 10 Apr 2009 13:22:41 +0000 (06:22 -0700)
TBR=r
OCL=27306
CL=27306

test/stack.go

index 7b7d36f916c9b63b0b5f0d766fb9dcc9dcb1e08d..ffc9ac14b0e6c66fe4a10efd7713eed82701533a 100644 (file)
@@ -31,8 +31,13 @@ func d(t T) {
 
 var c = make(chan int);
 var t T;
+var b = []byte{1,2,3,4,5,6,7,8,9,10};
 
 func recur(n int) {
+       ss := string(b);
+       if len(ss) != len(b) {
+               panic("bad []byte -> string");
+       }
        go g(c, t);
        s := <-c;
        if s != len(t) {