mirror of
https://github.com/robertkrimen/otto
synced 2025-10-26 20:28:49 +08:00
[#148] Updated lexer unit tests
This commit is contained in:
@@ -97,13 +97,13 @@ func TestLexer(t *testing.T) {
|
||||
test("abc = //",
|
||||
token.IDENTIFIER, "abc", 1,
|
||||
token.ASSIGN, "", 5,
|
||||
token.COMMENT, "", 7,
|
||||
token.EOF, "", 9,
|
||||
)
|
||||
|
||||
test("abc = /*test*/",
|
||||
token.IDENTIFIER, "abc", 1,
|
||||
token.ASSIGN, "", 5,
|
||||
token.COMMENT, "test", 7,
|
||||
token.EOF, "", 15,
|
||||
)
|
||||
|
||||
test("abc = 1 / 2",
|
||||
@@ -241,13 +241,13 @@ Second line \
|
||||
)
|
||||
|
||||
test("//",
|
||||
token.COMMENT, "", 1,
|
||||
token.EOF, "", 3,
|
||||
)
|
||||
|
||||
test(";;//test",
|
||||
token.SEMICOLON, "", 1,
|
||||
token.SEMICOLON, "", 2,
|
||||
token.COMMENT, "test", 3,
|
||||
token.EOF, "", 9,
|
||||
)
|
||||
|
||||
test("1",
|
||||
|
||||
Reference in New Issue
Block a user