1
0
mirror of https://github.com/golang/go synced 2024-11-17 14:14:56 -07:00

sort: harden limit in stable test

Reduce the number of allowed swap operations during stable sort. 

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12907045
This commit is contained in:
Volker Dobler 2013-08-27 08:41:43 -07:00 committed by Brad Fitzpatrick
parent 264b73b3f2
commit 2f81dfd53f

View 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.