]> Cypherpunks repositories - gostls13.git/commitdiff
sort: remove testing cycle
authorRuss Cox <rsc@golang.org>
Sat, 23 Jul 2011 01:17:46 +0000 (21:17 -0400)
committerRuss Cox <rsc@golang.org>
Sat, 23 Jul 2011 01:17:46 +0000 (21:17 -0400)
import cycle:
        "testing"
        imports "flag"
        imports "sort"
        imports "testing"

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4811048

src/pkg/sort/search_test.go
src/pkg/sort/sort_test.go

index 0005cd2cedfc19c1c7d92f5ef18ca5bf9f0d30fd..07295ffa976dc4ddc9b78966acc8d9541bf824ff 100644 (file)
@@ -2,9 +2,12 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-package sort
+package sort_test
 
-import "testing"
+import (
+       . "sort"
+       "testing"
+)
 
 func f(a []int, x int) func(int) bool {
        return func(i int) bool {
index 20e7287da99f2ba40eb6d45fbb93e2e04fd82865..64d486b7590dffa584428b7b69b6ca16c2cb465e 100644 (file)
@@ -2,11 +2,12 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-package sort
+package sort_test
 
 import (
        "fmt"
        "rand"
+       . "sort"
        "strconv"
        "testing"
 )
@@ -271,3 +272,10 @@ func TestBentleyMcIlroy(t *testing.T) {
                }
        }
 }
+
+func min(a, b int) int {
+       if a < b {
+               return a
+       }
+       return b
+}