]> Cypherpunks repositories - gostls13.git/commit
container/heap: correct number of elements in BenchmarkDup
authorJamil Djadala <djadala@gmail.com>
Wed, 20 Apr 2016 06:08:28 +0000 (09:08 +0300)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 20 Apr 2016 15:26:05 +0000 (15:26 +0000)
commit30c278dbe907111b51737adb8ba0a9e1956f3ed5
treec4813c4de7fd2917086104e54d6bcb4833be3e41
parent001e8e8070e8ed3a578dbad93cc3f70257e965bd
container/heap: correct number of elements in BenchmarkDup

In BenchmarkDup fuction, heap is created as h := make(myHeap, n)
and then n elements are added, so first time there are 2*n elements
in heap.

Fixes #15380

Change-Id: I0508486a847006b3cd545fd695e8b09af339134f
Reviewed-on: https://go-review.googlesource.com/22310
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/container/heap/heap_test.go