summaryrefslogtreecommitdiff
path: root/src/lib/strings_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/strings_test.go
parent924e27f38d133bc7c9978a061b20f950554434ee (diff)
downloadgolang-89995dcecf37b9a21c26783dcf8ab506da237363.tar.gz
convert *[] to [].
R=r OCL=21563 CL=21571
Diffstat (limited to 'src/lib/strings_test.go')
-rw-r--r--src/lib/strings_test.go26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/lib/strings_test.go b/src/lib/strings_test.go
index 50ad30cc3..83a4c6954 100644
--- a/src/lib/strings_test.go
+++ b/src/lib/strings_test.go
@@ -9,7 +9,7 @@ import (
"testing";
)
-func eq(a, b *[]string) bool {
+func eq(a, b []string) bool {
if len(a) != len(b) {
return false;
}
@@ -28,11 +28,11 @@ var dots = "1....2....3....4";
type ExplodeTest struct {
s string;
- a *[]string;
+ a []string;
}
var explodetests = []ExplodeTest {
- ExplodeTest{ abcd, &[]string{"a", "b", "c", "d"} },
- ExplodeTest{ faces, &[]string{"☺", "☻", "☹" } },
+ ExplodeTest{ abcd, []string{"a", "b", "c", "d"} },
+ ExplodeTest{ faces, []string{"☺", "☻", "☹" } },
}
export func TestExplode(t *testing.T) {
for i := 0; i < len(explodetests); i++ {
@@ -52,17 +52,17 @@ export func TestExplode(t *testing.T) {
type SplitTest struct {
s string;
sep string;
- a *[]string;
+ a []string;
}
var splittests = []SplitTest {
- SplitTest{ abcd, "a", &[]string{"", "bcd"} },
- SplitTest{ abcd, "z", &[]string{"abcd"} },
- SplitTest{ abcd, "", &[]string{"a", "b", "c", "d"} },
- SplitTest{ commas, ",", &[]string{"1", "2", "3", "4"} },
- SplitTest{ dots, "...", &[]string{"1", ".2", ".3", ".4"} },
- SplitTest{ faces, "☹", &[]string{"☺☻", ""} },
- SplitTest{ faces, "~", &[]string{faces} },
- SplitTest{ faces, "", &[]string{"☺", "☻", "☹"} },
+ SplitTest{ abcd, "a", []string{"", "bcd"} },
+ SplitTest{ abcd, "z", []string{"abcd"} },
+ SplitTest{ abcd, "", []string{"a", "b", "c", "d"} },
+ SplitTest{ commas, ",", []string{"1", "2", "3", "4"} },
+ SplitTest{ dots, "...", []string{"1", ".2", ".3", ".4"} },
+ SplitTest{ faces, "☹", []string{"☺☻", ""} },
+ SplitTest{ faces, "~", []string{faces} },
+ SplitTest{ faces, "", []string{"☺", "☻", "☹"} },
}
export func TestSplit(t *testing.T) {
for i := 0; i < len(splittests); i++ {