summaryrefslogtreecommitdiff
path: root/src/lib/strings_test.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-03-03 08:39:12 -0800
committerRuss Cox <rsc@golang.org>2009-03-03 08:39:12 -0800
commit150fc635c53ef552024088ac65f82522b3626808 (patch)
tree028f4f1a5f6b78795c1a1ef840b49c7da342edd1 /src/lib/strings_test.go
parent4041d184e8f1e2123b1d32d5f39190d34f50ea7e (diff)
downloadgolang-150fc635c53ef552024088ac65f82522b3626808.tar.gz
Automated g4 rollback of changelist 25024,
plus significant hand editing. Back to T{x} for composite literals. R=r OCL=25612 CL=25632
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 0efe254ce..2cbf70b93 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];