Skip to content

Commit d270e6f

Browse files
test: match gccgo import error messages
Gccgo doesn't have the same equivalent of file name and package as the gc compiler, so the error messages are necessarily different. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/40510048
1 parent 74a4354 commit d270e6f

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

test/fixedbugs/issue5957.dir/c.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package p
22

33
import (
4-
"./a" // ERROR "imported and not used: \x22a\x22 as surprise"
5-
"./b" // ERROR "imported and not used: \x22b\x22 as surprise2"
6-
b "./b" // ERROR "imported and not used: \x22b\x22$"
7-
foo "math" // ERROR "imported and not used: \x22math\x22 as foo"
4+
"./a" // ERROR "imported and not used: \x22a\x22 as surprise|imported and not used: surprise"
5+
"./b" // GC_ERROR "imported and not used: \x22b\x22 as surprise2|imported and not used: surprise2"
6+
b "./b" // ERROR "imported and not used: \x22b\x22$|imported and not used: surprise2"
7+
foo "math" // ERROR "imported and not used: \x22math\x22 as foo|imported and not used: math"
88
"fmt" // actually used
9-
"strings" // ERROR "imported and not used: \x22strings\x22"
9+
"strings" // ERROR "imported and not used: \x22strings\x22|imported and not used: strings"
1010
)
1111

1212
var _ = fmt.Printf

test/import1.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ import bufio "os" // ERROR "redeclared|redefinition|incompatible" "imported and
1515
import (
1616
"fmt" // GCCGO_ERROR "previous|not used"
1717
fmt "math" // ERROR "redeclared|redefinition|incompatible" "imported and not used: \x22math\x22 as fmt"
18-
. "math" // ERROR "imported and not used: \x22math\x22$"
18+
. "math" // GC_ERROR "imported and not used: \x22math\x22$"
1919
)

test/import4.dir/empty.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
package P
5+
package empty
66

77
import ( )
88
const ( )

test/import4.dir/import4.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import X "math" // ERROR "imported and not used.*math"
1818
import . "bufio" // ERROR "imported and not used.*bufio"
1919

2020
// again, package without anything in it
21-
import "./empty" // ERROR "imported and not used.*empty"
22-
import Z "./empty" // ERROR "imported and not used.*empty"
21+
import "./empty" // GC_ERROR "imported and not used.*empty"
22+
import Z "./empty" // GC_ERROR "imported and not used.*empty"
2323
import . "./empty" // ERROR "imported and not used.*empty"
2424

0 commit comments

Comments
 (0)