]> Cypherpunks repositories - gostls13.git/commitdiff
sort: harden limit in stable test
authorVolker Dobler <dr.volker.dobler@gmail.com>
Tue, 27 Aug 2013 15:41:43 +0000 (08:41 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 27 Aug 2013 15:41:43 +0000 (08:41 -0700)
Reduce the number of allowed swap operations during stable sort. 

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12907045

src/pkg/sort/sort_test.go

index fb872c2941d3a16f4fb1ece32cb7def14d23d260..3b705d7a244ec9e2e12c1bfa10f2f89485695c49 100644 (file)
@@ -350,7 +350,7 @@ func TestHeapsortBM(t *testing.T) {
 }
 
 func TestStableBM(t *testing.T) {
-       testBentleyMcIlroy(t, Stable, func(n int) int { return n * lg(n) * lg(n) })
+       testBentleyMcIlroy(t, Stable, func(n int) int { return n * lg(n) * lg(n) / 3 })
 }
 
 // This is based on the "antiquicksort" implementation by M. Douglas McIlroy.