public void Default() { var subject = new TestLexer(); var result = subject.GetTokens("d"); Check.That(result).ContainsExactly( new Token(0, Beer, "d") ); }
public void Multiline() { var subject = new TestLexer(); var result = subject.GetTokens("a\ne"); Check.That(result).ContainsExactly( new Token(0, Root, "a"), new Token(1, TokenTypes.Text, "\n"), new Token(2, Root, "e") ); }
public void SampleTest() { var subject = new TestLexer(); var result = subject.GetTokens("abcde"); Check.That(result).ContainsExactly( new Token(0, Root, "a"), new Token(1, Rag, "b"), new Token(2, Rag, "c"), new Token(3, Beer, "d"), new Token(4, Root, "e") ); }