MCPcopy Create free account
hub / github.com/douchuan/algorithm / preorder_recursive

Function preorder_recursive

tests/test_tree_traverse.rs:85–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

83
84#[test]
85fn preorder_recursive() {
86 for (t, expect) in preorder_test_data() {
87 let mut tree: Tree<usize, usize> = TreeBuilder::build_in_level(t.as_slice());
88 let r = unsafe { PreOrderVisitor::recursive(&mut tree) };
89 assert_eq!(
90 expect, r,
91 "tree = {:?}, expect = {:?}, r = {:?}",
92 t, expect, r
93 );
94 }
95}
96
97#[test]
98fn inorder_iter() {

Callers

nothing calls this directly

Calls 1

preorder_test_dataFunction · 0.85

Tested by

no test coverage detected