summaryrefslogtreecommitdiff
path: root/src/cmd/fix/sorthelpers_test.go
blob: dd6b58e033dd5f3f292a137b84cc18ca6d3417a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// 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, sorthelpers)
}

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)
}
`,
	},
}