summaryrefslogtreecommitdiff
path: root/src/lib/strings_test.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-02-13 14:48:32 -0800
committerRuss Cox <rsc@golang.org>2009-02-13 14:48:32 -0800
commit526837026995aa88a05eb73f83f8573d5c024882 (patch)
treea3b6c6ab9f68981976738f0efc7988353d5a0d82 /src/lib/strings_test.go
parentc2feca8a8dd68958c476a71b1e07b5cf43421a98 (diff)
downloadgolang-526837026995aa88a05eb73f83f8573d5c024882.tar.gz
convert composite literals from { } to ( ).
only non-trivial changes are in convlit1.go golden.out R=gri OCL=25019 CL=25024
Diffstat (limited to 'src/lib/strings_test.go')
-rw-r--r--src/lib/strings_test.go28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/strings_test.go b/src/lib/strings_test.go
index 2cbf70b93..0efe254ce 100644
--- a/src/lib/strings_test.go
+++ b/src/lib/strings_test.go
@@ -30,10 +30,10 @@ type ExplodeTest struct {
s string;
a []string;
}
-var explodetests = []ExplodeTest {
- ExplodeTest{ abcd, []string{"a", "b", "c", "d"} },
- ExplodeTest{ faces, []string{"☺", "☻", "☹" } },
-}
+var explodetests = []ExplodeTest (
+ ExplodeTest( abcd, []string("a", "b", "c", "d") ),
+ ExplodeTest( faces, []string("☺", "☻", "☹" ) ),
+)
func TestExplode(t *testing.T) {
for i := 0; i < len(explodetests); i++ {
tt := explodetests[i];
@@ -54,16 +54,16 @@ type SplitTest struct {
sep 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{"☺", "☻", "☹"} },
-}
+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("☺", "☻", "☹") ),
+)
func TestSplit(t *testing.T) {
for i := 0; i < len(splittests); i++ {
tt := splittests[i];