// 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()); }
// 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()); }
public void SolveTest() { NestingDepth nestingDepth = new NestingDepth(new NestingDepthInMemoryInputProiveder()); nestingDepth.Solve(); }