summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2010-02-01 16:26:50 -0800
committerIan Lance Taylor <iant@golang.org>2010-02-01 16:26:50 -0800
commite922ac4c6ff0f301a3829626761b8798a749e1b1 (patch)
tree14155bd333e88bdc7f523426f16742438801ba58
parent5ba58c401b78a6a429a3342158ad457858edf16f (diff)
downloadgolang-e922ac4c6ff0f301a3829626761b8798a749e1b1.tar.gz
Fix for gccgo, which uses a package prefix.
R=rsc CC=golang-dev http://codereview.appspot.com/198046
-rw-r--r--test/fixedbugs/bug248.dir/bug2.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/fixedbugs/bug248.dir/bug2.go b/test/fixedbugs/bug248.dir/bug2.go
index d562bf604..4e02b5d9a 100644
--- a/test/fixedbugs/bug248.dir/bug2.go
+++ b/test/fixedbugs/bug248.dir/bug2.go
@@ -37,11 +37,11 @@ func main() {
// check that reflect paths are correct,
// meaning that reflect data for v0, v1 didn't get confused.
- // path is full (rooted) path name. check suffix only.
- if s := reflect.Typeof(v0).PkgPath(); !strings.HasSuffix(s, "/bug0") {
+ // path is full (rooted) path name. check suffix for gc, prefix for gccgo
+ if s := reflect.Typeof(v0).PkgPath(); !strings.HasSuffix(s, "/bug0") && !strings.HasPrefix(s, "bug0") {
panicln("bad v0 path", len(s), s)
}
- if s := reflect.Typeof(v1).PkgPath(); !strings.HasSuffix(s, "/bug1") {
+ if s := reflect.Typeof(v1).PkgPath(); !strings.HasSuffix(s, "/bug1") && !strings.HasPrefix(s, "bug1") {
panicln("bad v1 path", s)
}