summaryrefslogtreecommitdiff
path: root/libgo/go/cmd/gofmt/testdata/slices1.input
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/cmd/gofmt/testdata/slices1.input')
-rw-r--r--libgo/go/cmd/gofmt/testdata/slices1.input8
1 files changed, 8 insertions, 0 deletions
diff --git a/libgo/go/cmd/gofmt/testdata/slices1.input b/libgo/go/cmd/gofmt/testdata/slices1.input
index 4d2cbfff400..1f25c43ccbc 100644
--- a/libgo/go/cmd/gofmt/testdata/slices1.input
+++ b/libgo/go/cmd/gofmt/testdata/slices1.input
@@ -1,3 +1,5 @@
+//gofmt -s
+
// Test cases for slice expression simplification.
package p
@@ -15,6 +17,7 @@ var (
_ = a[3:(len(a))]
_ = a[len(a) : len(a)-1]
_ = a[0:len(b)]
+ _ = a[2:len(a):len(a)]
_ = a[:]
_ = a[:10]
@@ -22,6 +25,7 @@ var (
_ = a[:(len(a))]
_ = a[:len(a)-1]
_ = a[:len(b)]
+ _ = a[:len(a):len(a)]
_ = s[0:]
_ = s[1:10]
@@ -29,6 +33,7 @@ var (
_ = s[3:(len(s))]
_ = s[len(a) : len(s)-1]
_ = s[0:len(b)]
+ _ = s[2:len(s):len(s)]
_ = s[:]
_ = s[:10]
@@ -36,6 +41,7 @@ var (
_ = s[:(len(s))]
_ = s[:len(s)-1]
_ = s[:len(b)]
+ _ = s[:len(s):len(s)]
_ = t.s[0:]
_ = t.s[1:10]
@@ -43,6 +49,7 @@ var (
_ = t.s[3:(len(t.s))]
_ = t.s[len(a) : len(t.s)-1]
_ = t.s[0:len(b)]
+ _ = t.s[2:len(t.s):len(t.s)]
_ = t.s[:]
_ = t.s[:10]
@@ -50,6 +57,7 @@ var (
_ = t.s[:(len(t.s))]
_ = t.s[:len(t.s)-1]
_ = t.s[:len(b)]
+ _ = t.s[:len(t.s):len(t.s)]
)
func _() {