Skip to content

Commit

Permalink
hand/lexer_test: Add quiet/lexer/l01.c tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
sangisos committed Feb 23, 2016
1 parent f9691b1 commit 60a92a8
Showing 1 changed file with 50 additions and 1 deletion.
51 changes: 50 additions & 1 deletion uc/hand/lexer/lexer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,56 @@ func TestLexer(t *testing.T) {
},
// TODO: Add tokens for the following test cases.
//{path: "../../testdata/incorrect/lexer/ugly.c"},
//{path: "../../testdata/quiet/lexer/l01.c"},
{
path: "../../testdata/quiet/lexer/l01.c",
toks: []token.Token{
{
Kind: token.Ident,
Val: "int",
Pos: 0,
},
{
Kind: token.Ident,
Val: "main",
Pos: 4,
},
{
Kind: token.Lparen,
Val: "(",
Pos: 9,
},
{
Kind: token.Ident,
Val: "void",
Pos: 10,
},
{
Kind: token.Rparen,
Val: ")",
Pos: 14,
},
{
Kind: token.Lbrace,
Val: "{",
Pos: 16,
},
{
Kind: token.Semicolon,
Val: ";",
Pos: 18,
},
{
Kind: token.Rbrace,
Val: "}",
Pos: 20,
},
{
Kind: token.EOF,
Val: "",
Pos: 23,
},
},
},
//{path: "../../testdata/quiet/lexer/l02.c"},
//{path: "../../testdata/quiet/lexer/l03.c"},
//{path: "../../testdata/quiet/lexer/l04.c"},
Expand Down

0 comments on commit 60a92a8

Please sign in to comment.