Ejemplo n.º 1
0
 // throws VisitFailure
 public virtual void testDepth2()
 {
     IVisitor recognize = new SucceedAtNodes(n1, n12);
     NestingDepth nd = new NestingDepth(recognize);
     nd.visit(n0);
     Assertion.AssertEquals(2,nd.getDepth());
 }
Ejemplo n.º 2
0
 // throws VisitFailure
 public virtual void testNestingStopAt()
 {
     IVisitor recognize = new FailAtNodes(n1, n12);
     IVisitor goOnWhile = new SucceedAtNodes(n0, n1);
     NestingDepth nd = new NestingDepth(recognize, goOnWhile);
     nd.visit(n0);
     Assertion.AssertEquals(1, nd.getDepth());
 }
Ejemplo n.º 3
0
        public void SolveTest()
        {
            NestingDepth nestingDepth = new NestingDepth(new NestingDepthInMemoryInputProiveder());

            nestingDepth.Solve();
        }