mirror of
https://github.com/golang/go
synced 2024-10-03 08:11:27 -06:00
fix to scanner_test after change to //-style comment token
R=rsc OCL=31421 CL=31421
This commit is contained in:
parent
ee5fe7756f
commit
f7b92bb45d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user