Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }