tests/cut_the_tree/funcs_bench_test.go
Андрей Иванов 9b947bf937
All checks were successful
continuous-integration/drone/push Build is passing
Добавил обход в глубину с DLL вместо стека
2024-09-12 13:02:41 +03:00

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())
}
}