16 lines
715 B
Go
16 lines
715 B
Go
package cut_the_tree_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func BenchmarkNode_WeighingTreeWithRecursion(b *testing.B) {
|
|
for i := 0; i < b.N; i++ {
|
|
output := map[string]uint16{"node0":1416, "node01":194, "node011":49, "node012":49, "node013":49, "node02":194, "node021":49, "node022":49, "node023":49, "node03":983,"node031":361, "node0311":210, "node03111":53, "node03112":53, "node03113":53, "node0312":51, "node0313":51, "node032":49, "node033":526, "node0331":51, "node0332":375, "node03321":53, "node03322":53, "node03323":218, "node033231":55, "node033232":55, "node033233":55, "node0333":51}
|
|
|
|
assert.EqualValues(b, output, testOrdinaryVFS.WeighingTreeWithRecursion())
|
|
}
|
|
}
|