From: Robert Griesemer Date: Thu, 9 Jul 2009 23:54:08 +0000 (-0700) Subject: fix to scanner_test after change to //-style comment token X-Git-Tag: weekly.2009-11-06~1194 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f7b92bb45d7d269b4f3583bba8347c25523ade3f;p=gostls13.git fix to scanner_test after change to //-style comment token R=rsc OCL=31421 CL=31421 --- diff --git a/src/pkg/go/scanner/scanner_test.go b/src/pkg/go/scanner/scanner_test.go index 17491e6565..18dae19cc2 100644 --- a/src/pkg/go/scanner/scanner_test.go +++ b/src/pkg/go/scanner/scanner_test.go @@ -221,6 +221,11 @@ func TestScan(t *testing.T) { } eloc.Offset += len(lit) + len(whitespace); eloc.Line += NewlineCount(lit) + whitespace_linecount; + if tok == token.COMMENT && litb[1] == '/' { + // correct for unaccounted '/n' in //-style comment + eloc.Offset++; + eloc.Line++; + } index++; return tok != token.EOF; }