summaryrefslogtreecommitdiff
path: root/src/lib/utf8_test.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2008-12-18 22:37:22 -0800
committerRuss Cox <rsc@golang.org>2008-12-18 22:37:22 -0800
commit89995dcecf37b9a21c26783dcf8ab506da237363 (patch)
tree851fad01a87b8fa071ed46fa0985f1857d9e47ca /src/lib/utf8_test.go
parent924e27f38d133bc7c9978a061b20f950554434ee (diff)
downloadgolang-89995dcecf37b9a21c26783dcf8ab506da237363.tar.gz
convert *[] to [].
R=r OCL=21563 CL=21571
Diffstat (limited to 'src/lib/utf8_test.go')
-rw-r--r--src/lib/utf8_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/utf8_test.go b/src/lib/utf8_test.go
index 31118dd30..a0fe345bd 100644
--- a/src/lib/utf8_test.go
+++ b/src/lib/utf8_test.go
@@ -44,7 +44,7 @@ var utf8map = []Utf8Map {
Utf8Map{ 0x10ffff, "\xf4\x8f\xbf\xbf" },
}
-func Bytes(s string) *[]byte {
+func Bytes(s string) []byte {
b := new([]byte, len(s)+1);
if !syscall.StringToBytes(b, s) {
panic("StringToBytes failed");
@@ -74,7 +74,7 @@ export func TestFullRune(t *testing.T) {
}
}
-func EqualBytes(a, b *[]byte) bool {
+func EqualBytes(a, b []byte) bool {
if len(a) != len(b) {
return false;
}
@@ -91,8 +91,8 @@ export func TestEncodeRune(t *testing.T) {
m := utf8map[i];
b := Bytes(m.str);
var buf [10]byte;
- n := utf8.EncodeRune(m.rune, &buf);
- b1 := (&buf)[0:n];
+ n := utf8.EncodeRune(m.rune, buf);
+ b1 := buf[0:n];
if !EqualBytes(b, b1) {
t.Errorf("EncodeRune(0x%04x) = %q want %q", m.rune, b1, b);
}