AjLang.Tests.Compiler.LexerTests.SkipCommentAndGetEndOfLineName C# (CSharp) Method

SkipCommentAndGetEndOfLineName() private method

private SkipCommentAndGetEndOfLineName ( ) : void
return void
        public void SkipCommentAndGetEndOfLineName()
        {
            Lexer lexer = new Lexer("# this is a name\r\nfoo");

            Token token = lexer.NextToken();

            Assert.IsNotNull(token);
            Assert.AreEqual(TokenType.EndOfLine, token.Type);

            token = lexer.NextToken();

            Assert.IsNotNull(token);
            Assert.AreEqual("foo", token.Value);
            Assert.AreEqual(TokenType.Name, token.Type);

            Assert.IsNull(lexer.NextToken());
        }