From f7b92bb45d7d269b4f3583bba8347c25523ade3f Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Thu, 9 Jul 2009 16:54:08 -0700 Subject: [PATCH] fix to scanner_test after change to //-style comment token R=rsc OCL=31421 CL=31421 --- src/pkg/go/scanner/scanner_test.go | 5 +++++ 1 file changed, 5 insertions(+) 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; }