diff options
author | Russ Cox <rsc@golang.org> | 2009-06-25 14:44:09 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-06-25 14:44:09 -0700 |
commit | f682aa9bc49c7ea792addc0056955a22c8e42385 (patch) | |
tree | 5cc2ca003b31c3178e73e2401433c0e5d99d69e5 /test/indirect.go | |
parent | ca756e1b7cec38a1c835853050d5f660baf9a43a (diff) | |
download | go-f682aa9bc49c7ea792addc0056955a22c8e42385.tar.gz |
update tests for CL 30586.
won't submit unless 30586 goes in.
R=r
DELTA=94 (65 added, 16 deleted, 13 changed)
OCL=30592
CL=30755
Diffstat (limited to 'test/indirect.go')
-rw-r--r-- | test/indirect.go | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/test/indirect.go b/test/indirect.go index 4200d382a..cbe3e0df2 100644 --- a/test/indirect.go +++ b/test/indirect.go @@ -33,11 +33,7 @@ func crash() // these uses of nil pointers // would crash but should type check println("crash", - len(m1)+ - len(s1)+ - len(a1)+ - len(b1)+ - cap(b1)); + len(a1) + cap(a1)); } func nocrash() @@ -49,19 +45,15 @@ func nocrash() // it might also help in the traceback. x := len(m0)+ - len(m2)+ - len(m3)+ - len(m4); - if x != 2 { + len(m3); + if x != 1 { panicln("wrong maplen"); } x = len(s0)+ - len(s2)+ - len(s3)+ - len(s4); - if x != 2 { + len(s3); + if x != 1 { panicln("wrong stringlen"); } @@ -74,19 +66,15 @@ func nocrash() x = len(b0)+ - len(b2)+ - len(b3)+ - len(b4); - if x != 6 { + len(b3); + if x != 3 { panicln("wrong slicelen"); } x = cap(b0)+ - cap(b2)+ - cap(b3)+ - cap(b4); - if x != 6 { + cap(b3); + if x != 3 { panicln("wrong slicecap"); } } |