1
0
mirror of https://github.com/golang/go synced 2024-09-23 23:20:14 -06:00

test: don't rely on order of unrelated imports in bug191

There is no necessary relationship between the imports of the
packages a and b, and gccgo happens to import them in a
different order, leading to different output.  This ordering
is not the purpose of the test in any case.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/40400043
This commit is contained in:
Ian Lance Taylor 2013-12-10 12:05:37 -08:00
parent c69402d82b
commit 6ae3780503
5 changed files with 10 additions and 5 deletions

View File

@ -4,8 +4,10 @@
package a package a
var A int
func init() { func init() {
println("a"); A = 1
} }
type T int; type T int;

View File

@ -4,8 +4,10 @@
package b package b
var B int
func init() { func init() {
println("b"); B = 2
} }
type V int; type V int;

View File

@ -11,4 +11,7 @@ var _ T
var _ V var _ V
func main() { func main() {
if A != 1 || B != 2 {
panic("wrong vars")
}
} }

View File

@ -1,4 +1,4 @@
// rundircmpout // rundir
// Copyright 2009 The Go Authors. All rights reserved. // Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style

View File

@ -1,2 +0,0 @@
b
a