public void ShouldMatch() { TerminalInput input; input = new TerminalInput(new Token("C", "V")); Assert.IsTrue(input.Match(new Token("C", "V"))); Assert.IsTrue(input.Match(new TerminalInput(new Token("C", "V")))); }
public void ShouldMatch() { TerminalInput input; input = new TerminalInput('a'); Assert.IsTrue(input.Match('a')); Assert.IsTrue(input.Match(new TerminalInput('a'))); }
public void ShouldNotMatch() { TerminalInput input; input = new TerminalInput(new Token("C", "V")); Assert.IsFalse(input.Match(new Token("C", "v"))); Assert.IsFalse(input.Match(new TerminalInput(new Token("C", "v")))); Assert.IsFalse(input.Match(new NonTerminalInput("a"))); Assert.IsFalse(input.Match(new EOSInput <Token>())); }
public void ShouldNotMatch() { TerminalInput input; input = new TerminalInput('a'); Assert.IsFalse(input.Match('b')); Assert.IsFalse(input.Match(new TerminalInput('b'))); Assert.IsFalse(input.Match(new NonTerminalInput("a"))); Assert.IsFalse(input.Match(new EOSInput <char>())); }