예제 #1
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));
        }
예제 #2
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));
        }
예제 #3
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));
        }