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

Function preorder_morris

tests/test_tree_traverse.rs:72–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70
71#[test]
72fn preorder_morris() {
73 for (t, expect) in preorder_test_data() {
74 let mut tree: Tree<usize, usize> = TreeBuilder::build_in_level(t.as_slice());
75 let r = unsafe { PreOrderVisitor::morris(&mut tree) };
76 assert_eq!(
77 expect, r,
78 "tree = {:?}, expect = {:?}, r = {:?}",
79 t, expect, r
80 );
81 }
82}
83
84#[test]
85fn preorder_recursive() {

Callers

nothing calls this directly

Calls 1

preorder_test_dataFunction · 0.85

Tested by

no test coverage detected