mirror of
https://github.com/golang/go
synced 2024-11-26 16:46:58 -07: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:
parent
c69402d82b
commit
6ae3780503
@ -4,8 +4,10 @@
|
||||
|
||||
package a
|
||||
|
||||
var A int
|
||||
|
||||
func init() {
|
||||
println("a");
|
||||
A = 1
|
||||
}
|
||||
|
||||
type T int;
|
||||
|
@ -4,8 +4,10 @@
|
||||
|
||||
package b
|
||||
|
||||
var B int
|
||||
|
||||
func init() {
|
||||
println("b");
|
||||
B = 2
|
||||
}
|
||||
|
||||
type V int;
|
||||
|
@ -11,4 +11,7 @@ var _ T
|
||||
var _ V
|
||||
|
||||
func main() {
|
||||
if A != 1 || B != 2 {
|
||||
panic("wrong vars")
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// rundircmpout
|
||||
// rundir
|
||||
|
||||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
|
@ -1,2 +0,0 @@
|
||||
b
|
||||
a
|
Loading…
Reference in New Issue
Block a user