summaryrefslogtreecommitdiff
path: root/src/pkg/go/scanner/scanner_test.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2009-12-09 16:54:07 -0800
committerRobert Griesemer <gri@golang.org>2009-12-09 16:54:07 -0800
commit0f265b61e8a1dd3c2a9e9e67b2c8a06ba835dabf (patch)
tree3dcff34cda5305eeb27606048c4460b0761b01ef /src/pkg/go/scanner/scanner_test.go
parentb7a9cd5ad38e32bb598bb20ec2b6d8198a305a5c (diff)
downloadgolang-0f265b61e8a1dd3c2a9e9e67b2c8a06ba835dabf.tar.gz
remove uses of string concatenation from src and misc directory
R=rsc http://codereview.appspot.com/172041
Diffstat (limited to 'src/pkg/go/scanner/scanner_test.go')
-rw-r--r--src/pkg/go/scanner/scanner_test.go19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/pkg/go/scanner/scanner_test.go b/src/pkg/go/scanner/scanner_test.go
index 5ce7bd9be..c13328926 100644
--- a/src/pkg/go/scanner/scanner_test.go
+++ b/src/pkg/go/scanner/scanner_test.go
@@ -66,8 +66,8 @@ var tokens = [...]elt{
elt{token.CHAR, "'\\uff16'", literal},
elt{token.CHAR, "'\\U0000ff16'", literal},
elt{token.STRING, "`foobar`", literal},
- elt{token.STRING, "`" `foo
- bar`
+ elt{token.STRING, "`" + `foo
+ bar` +
"`",
literal,
},
@@ -345,16 +345,15 @@ func TestIllegalChars(t *testing.T) {
func TestStdErrorHander(t *testing.T) {
- const src = "@\n" // illegal character, cause an error
- "@ @\n" // two errors on the same line
- "//line File2:20\n"
- "@\n" // different file, but same line
- "//line File2:1\n"
- "@ @\n" // same file, decreasing line number
- "//line File1:1\n"
+ const src = "@\n" + // illegal character, cause an error
+ "@ @\n" + // two errors on the same line
+ "//line File2:20\n" +
+ "@\n" + // different file, but same line
+ "//line File2:1\n" +
+ "@ @\n" + // same file, decreasing line number
+ "//line File1:1\n" +
"@ @ @"; // original file, line 1 again
-
v := new(ErrorVector);
nerrors := Tokenize("File1", strings.Bytes(src), v, 0,
func(pos token.Position, tok token.Token, litb []byte) bool {