aboutsummaryrefslogtreecommitdiff
path: root/test/utf.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2008-08-11 22:07:49 -0700
committerRob Pike <r@golang.org>2008-08-11 22:07:49 -0700
commitbc2f5f1dce1687d0aff0d51ea1b56a5d52aa3891 (patch)
tree9d0faf1d96579f8c9fb0321586cab7c5149ccdf1 /test/utf.go
parent7293dab5a9e4d0fb4b66fd76bab2572bbebc050d (diff)
downloadgo-bc2f5f1dce1687d0aff0d51ea1b56a5d52aa3891.tar.gz
go-bc2f5f1dce1687d0aff0d51ea1b56a5d52aa3891.zip
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.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/utf.go b/test/utf.go
index cf0c746ab9..206f67c731 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++;
}
}