mirror of
https://github.com/golang/go
synced 2024-11-21 20:14:52 -07:00
go/scanner: fix build (adjust scanner EOF linecount)
R=adg CC=golang-dev https://golang.org/cl/3990045
This commit is contained in:
parent
4497960b2d
commit
1e17621cbe
@ -223,7 +223,7 @@ func TestScan(t *testing.T) {
|
||||
for _, e := range tokens {
|
||||
src += e.lit + whitespace
|
||||
}
|
||||
src_linecount := newlineCount(src) + 1
|
||||
src_linecount := newlineCount(src)
|
||||
whitespace_linecount := newlineCount(whitespace)
|
||||
|
||||
// verify scan
|
||||
@ -241,7 +241,7 @@ func TestScan(t *testing.T) {
|
||||
if tok == token.EOF {
|
||||
lit = "<EOF>"
|
||||
epos.Line = src_linecount
|
||||
epos.Column = 1
|
||||
epos.Column = 2
|
||||
}
|
||||
checkPos(t, lit, pos, epos)
|
||||
if tok != e.tok {
|
||||
|
Loading…
Reference in New Issue
Block a user