diff options
author | Rob Pike <r@golang.org> | 2008-08-11 22:07:49 -0700 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2008-08-11 22:07:49 -0700 |
commit | 9836f34dec5002c36672fdfcbcccc93df4652704 (patch) | |
tree | 9d0faf1d96579f8c9fb0321586cab7c5149ccdf1 /test/utf.go | |
parent | 4f0f8b947606f59073fb8e46f8bd701907c0b2f9 (diff) | |
download | golang-9836f34dec5002c36672fdfcbcccc93df4652704.tar.gz |
fix bug depot:
1) fix print statements, panic statements (parentheses required)
2) len is now allowed as a var name (bug053)
R=gri
OCL=14106
CL=14106
Diffstat (limited to 'test/utf.go')
-rw-r--r-- | test/utf.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/utf.go b/test/utf.go index cf0c746ab..206f67c73 100644 --- a/test/utf.go +++ b/test/utf.go @@ -22,13 +22,13 @@ func main() { for w, i, j := 0,0,0; i < l; i += w { var r int32; r, w = sys.stringtorune(s, i, l); - if w == 0 { panic "zero width in string" } - if r != chars[j] { panic "wrong value from string" } + if w == 0 { panic("zero width in string") } + if r != chars[j] { panic("wrong value from string") } j++; } // encoded as bytes: 'a' 'b' 'c' e6 97 a5 e6 9c ac e8 aa 9e const L = 12; - if L != l { panic "wrong length constructing array" } + if L != l { panic("wrong length constructing array") } a := new([L]byte); a[0] = 'a'; a[1] = 'b'; @@ -45,8 +45,8 @@ func main() { for w, i, j := 0,0,0; i < L; i += w { var r int32; r, w = sys.bytestorune(&a[0], i, L); - if w == 0 { panic "zero width in bytes" } - if r != chars[j] { panic "wrong value from bytes" } + if w == 0 { panic("zero width in bytes") } + if r != chars[j] { panic("wrong value from bytes") } j++; } } |