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
This commit is contained in:
Ian Lance Taylor 2013-12-12 19:02:11 -08:00
parent 74a43546b0
commit d270e6f28c
4 changed files with 9 additions and 9 deletions

View file

@ -1,12 +1,12 @@
package p
import (
"./a" // ERROR "imported and not used: \x22a\x22 as surprise"
"./b" // ERROR "imported and not used: \x22b\x22 as surprise2"
b "./b" // ERROR "imported and not used: \x22b\x22$"
foo "math" // ERROR "imported and not used: \x22math\x22 as foo"
"./a" // ERROR "imported and not used: \x22a\x22 as surprise|imported and not used: surprise"
"./b" // GC_ERROR "imported and not used: \x22b\x22 as surprise2|imported and not used: surprise2"
b "./b" // ERROR "imported and not used: \x22b\x22$|imported and not used: surprise2"
foo "math" // ERROR "imported and not used: \x22math\x22 as foo|imported and not used: math"
"fmt" // actually used
"strings" // ERROR "imported and not used: \x22strings\x22"
"strings" // ERROR "imported and not used: \x22strings\x22|imported and not used: strings"
)
var _ = fmt.Printf

View file

@ -15,5 +15,5 @@ import bufio "os" // ERROR "redeclared|redefinition|incompatible" "imported and
import (
"fmt" // GCCGO_ERROR "previous|not used"
fmt "math" // ERROR "redeclared|redefinition|incompatible" "imported and not used: \x22math\x22 as fmt"
. "math" // ERROR "imported and not used: \x22math\x22$"
. "math" // GC_ERROR "imported and not used: \x22math\x22$"
)

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package P
package empty
import ( )
const ( )

View file

@ -18,7 +18,7 @@ import X "math" // ERROR "imported and not used.*math"
import . "bufio" // ERROR "imported and not used.*bufio"
// again, package without anything in it
import "./empty" // ERROR "imported and not used.*empty"
import Z "./empty" // ERROR "imported and not used.*empty"
import "./empty" // GC_ERROR "imported and not used.*empty"
import Z "./empty" // GC_ERROR "imported and not used.*empty"
import . "./empty" // ERROR "imported and not used.*empty"