1
0
mirror of https://github.com/golang/go synced 2024-10-05 20:31:20 -06:00
go/src/cmd/gofix/sorthelpers_test.go
Andrew Gerrand 5bcbcab311 sort: rename helpers: s/Sort// in sort.Sort[Float64s|Ints|Strings]
Includes 'sorthelpers' gofix and updates to tree.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4631098
2011-07-08 10:52:50 +10:00

46 lines
616 B
Go

// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
func init() {
addTestCases(sorthelpersTests)
}
var sorthelpersTests = []testCase{
{
Name: "sortslice.0",
In: `package main
import (
"sort"
)
func main() {
var s []string
sort.SortStrings(s)
var i []ints
sort.SortInts(i)
var f []float64
sort.SortFloat64s(f)
}
`,
Out: `package main
import (
"sort"
)
func main() {
var s []string
sort.Strings(s)
var i []ints
sort.Ints(i)
var f []float64
sort.Float64s(f)
}
`,
},
}