diff options
author | Robert Griesemer <gri@golang.org> | 2009-07-09 16:54:08 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2009-07-09 16:54:08 -0700 |
commit | f2523be3cc1fd12378d74649a64c6f8c9a731f3a (patch) | |
tree | 0561cb352667f87f699fb24277a8ad85c996c07d /src/pkg/go/scanner/scanner_test.go | |
parent | 868152560b40692be77ed8cee062367df373ad09 (diff) | |
download | golang-f2523be3cc1fd12378d74649a64c6f8c9a731f3a.tar.gz |
fix to scanner_test after change to //-style comment token
R=rsc
OCL=31421
CL=31421
Diffstat (limited to 'src/pkg/go/scanner/scanner_test.go')
-rw-r--r-- | src/pkg/go/scanner/scanner_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pkg/go/scanner/scanner_test.go b/src/pkg/go/scanner/scanner_test.go index 17491e656..18dae19cc 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; } |