~john-koepi/ubuntu/trusty/golang/default

« back to all changes in this revision

Viewing changes to src/cmd/gofix/sorthelpers_test.go

  • Committer: Bazaar Package Importer
  • Author(s): Ondřej Surý
  • Date: 2011-08-03 17:04:59 UTC
  • mfrom: (14.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110803170459-wzd99m3567y80ila
Tags: 1:59-1
* Imported Upstream version 59
* Refresh patches to a new release
* Fix FTBFS on ARM (Closes: #634270)
* Update version.bash to work with Debian packaging and not hg
  repository

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright 2011 The Go Authors.  All rights reserved.
 
2
// Use of this source code is governed by a BSD-style
 
3
// license that can be found in the LICENSE file.
 
4
 
 
5
package main
 
6
 
 
7
func init() {
 
8
        addTestCases(sorthelpersTests)
 
9
}
 
10
 
 
11
var sorthelpersTests = []testCase{
 
12
        {
 
13
                Name: "sortslice.0",
 
14
                In: `package main
 
15
 
 
16
import (
 
17
        "sort"
 
18
)
 
19
 
 
20
func main() {
 
21
        var s []string
 
22
        sort.SortStrings(s)
 
23
        var i []ints
 
24
        sort.SortInts(i)
 
25
        var f []float64
 
26
        sort.SortFloat64s(f)
 
27
}
 
28
`,
 
29
                Out: `package main
 
30
 
 
31
import (
 
32
        "sort"
 
33
)
 
34
 
 
35
func main() {
 
36
        var s []string
 
37
        sort.Strings(s)
 
38
        var i []ints
 
39
        sort.Ints(i)
 
40
        var f []float64
 
41
        sort.Float64s(f)
 
42
}
 
43
`,
 
44
        },
 
45
}