aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/syntax/parser_test.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2016-11-30 23:28:40 -0800
committerRobert Griesemer <gri@golang.org>2016-12-09 00:43:04 +0000
commit32bf2829a17a90bdbd472335707639ba35776da6 (patch)
treed40b974e80f953388fee9320a53fcde833e6e2fb /src/cmd/compile/internal/syntax/parser_test.go
parent8d20b25779d4ce32e8eaeb52374fba1e74f7df57 (diff)
downloadgo-32bf2829a17a90bdbd472335707639ba35776da6.tar.gz
go-32bf2829a17a90bdbd472335707639ba35776da6.zip
[dev.inline] cmd/compile/internal/syntax: process //line pragmas in scanner
Reviewed in and cherry-picked from https://go-review.googlesource.com/#/c/33764/. Minor adjustment in noder.go to make merge compile again. Change-Id: Ib5029b52b59944f207b0f2438c8a5aa576eb25b8 Reviewed-on: https://go-review.googlesource.com/34233 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/syntax/parser_test.go')
-rw-r--r--src/cmd/compile/internal/syntax/parser_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/syntax/parser_test.go b/src/cmd/compile/internal/syntax/parser_test.go
index 482ab05675..fb1a761531 100644
--- a/src/cmd/compile/internal/syntax/parser_test.go
+++ b/src/cmd/compile/internal/syntax/parser_test.go
@@ -133,7 +133,7 @@ func verifyPrint(filename string, ast1 *File) {
panic(err)
}
- ast2, err := ParseBytes(buf1.Bytes(), nil, nil, 0)
+ ast2, err := ParseBytes(filename, buf1.Bytes(), nil, nil, 0)
if err != nil {
panic(err)
}
@@ -157,7 +157,7 @@ func verifyPrint(filename string, ast1 *File) {
}
func TestIssue17697(t *testing.T) {
- _, err := ParseBytes(nil, nil, nil, 0) // return with parser error, don't panic
+ _, err := ParseBytes("", nil, nil, nil, 0) // return with parser error, don't panic
if err == nil {
t.Errorf("no error reported")
}