26 lines
677 B
Go
26 lines
677 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func BenchmarkNode_WeighingSmallOrdinaryTreeWithRecursion(b *testing.B) {
|
|
for i := 0; i < b.N; i++ {
|
|
assert.EqualValues(b, testOrdinaryVFS.Weghts, testOrdinaryVFS.Tree.WeighingTreeWithRecursion())
|
|
}
|
|
}
|
|
|
|
func BenchmarkNode_WeighingSmallOrdinaryTreeWithStack(b *testing.B) {
|
|
for i := 0; i < b.N; i++ {
|
|
assert.EqualValues(b, testOrdinaryVFS.Weghts, testOrdinaryVFS.Tree.WeighingTreeWithStack())
|
|
}
|
|
}
|
|
|
|
func BenchmarkNode_WeighingSmallOrdinaryTreeWithDLL(b *testing.B) {
|
|
for i := 0; i < b.N; i++ {
|
|
assert.EqualValues(b, testOrdinaryVFS.Weghts, testOrdinaryVFS.Tree.WeightingTreeWithDLL())
|
|
}
|
|
}
|