]> Cypherpunks repositories - gostls13.git/commitdiff
go/scanner: fix build (adjust scanner EOF linecount)
authorRobert Griesemer <gri@golang.org>
Thu, 27 Jan 2011 06:09:14 +0000 (22:09 -0800)
committerRobert Griesemer <gri@golang.org>
Thu, 27 Jan 2011 06:09:14 +0000 (22:09 -0800)
R=adg
CC=golang-dev
https://golang.org/cl/3990045

src/pkg/go/scanner/scanner_test.go

index 1c3b6728c275e620a23945b8a12234f6cfcf63ef..c622ff482f34bb19d68751f5f2f15787b332f929 100644 (file)
@@ -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 {