diff options
Diffstat (limited to 'src/cmd/gofmt/testdata/ranges.input')
-rw-r--r-- | src/cmd/gofmt/testdata/ranges.input | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/cmd/gofmt/testdata/ranges.input b/src/cmd/gofmt/testdata/ranges.input new file mode 100644 index 0000000..df5f833 --- /dev/null +++ b/src/cmd/gofmt/testdata/ranges.input @@ -0,0 +1,20 @@ +//gofmt -s + +// Test cases for range simplification. +package p + +func _() { + for a, b = range x {} + for a, _ = range x {} + for _, b = range x {} + for _, _ = range x {} + + for a = range x {} + for _ = range x {} + + for a, b := range x {} + for a, _ := range x {} + for _, b := range x {} + + for a := range x {} +} |