コード例 #1
0
        public void TreeTraversal_TreeCompare_Paths_MatchButRightDeeper__DFS()
        {
            TreeNodePath left  = new TreeNodePath(0, 1, 1);
            TreeNodePath right = new TreeNodePath(0, 1, 1, 0);

            Assert.AreEqual(LeftBeforeRight, TreeCompare.CompareTreeNodePaths(left, right, eTraversalFlowDirection.ThroughChildren, eTraversalStrategy.DepthFirst));
        }
コード例 #2
0
        public void TreeTraversal_TreeCompare_Paths_Match__BFS()
        {
            TreeNodePath left  = new TreeNodePath(0, 1, 1);
            TreeNodePath right = new TreeNodePath(0, 1, 1);

            Assert.AreEqual(Match, TreeCompare.CompareTreeNodePaths(left, right, eTraversalFlowDirection.ThroughChildren, eTraversalStrategy.BreadthFirst));
        }
コード例 #3
0
        public void TreeTraversal_TreeCompare_Paths_RightDeeperLaterBranch__BFS()
        {
            TreeNodePath left  = new TreeNodePath(0, 1, 0, 0);
            TreeNodePath right = new TreeNodePath(0, 1, 1, 0, 0);

            Assert.AreEqual(LeftBeforeRight, TreeCompare.CompareTreeNodePaths(left, right, eTraversalFlowDirection.ThroughChildren, eTraversalStrategy.BreadthFirst));
        }
コード例 #4
0
 public void Init()
 {
     _treeCompare = new TreeCompare();
 }