diff options
Diffstat (limited to 'src/cmd/compile/internal/syntax/scanner_test.go')
| -rw-r--r-- | src/cmd/compile/internal/syntax/scanner_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/syntax/scanner_test.go b/src/cmd/compile/internal/syntax/scanner_test.go index fcdc3348e4..ed240df069 100644 --- a/src/cmd/compile/internal/syntax/scanner_test.go +++ b/src/cmd/compile/internal/syntax/scanner_test.go @@ -66,6 +66,11 @@ func TestTokens(t *testing.T) { } switch want.tok { + case _Semi: + if got.lit != "semicolon" { + t.Errorf("got %s; want semicolon", got.lit) + } + case _Name, _Literal: if got.lit != want.src { t.Errorf("got lit = %q; want %q", got.lit, want.src) @@ -94,6 +99,9 @@ func TestTokens(t *testing.T) { t.Errorf("got tok = %s; want ;", got.tok) continue } + if got.lit != "newline" { + t.Errorf("got %s; want newline", got.lit) + } } got.next() |
