imports: fix test to work with gccgo
Change-Id: I382905b7b7bd8189c169048ba05080ee96e1da5b
Reviewed-on: https://go-review.googlesource.com/117995
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/imports/fix_test.go b/imports/fix_test.go
index 62c6f3c..e287300 100644
--- a/imports/fix_test.go
+++ b/imports/fix_test.go
@@ -1214,13 +1214,16 @@
oldGOPATH := build.Default.GOPATH
oldGOROOT := build.Default.GOROOT
+ oldCompiler := build.Default.Compiler
build.Default.GOPATH = ""
+ build.Default.Compiler = "gc"
testHookScanDir = func(string) {}
defer func() {
testHookScanDir = func(string) {}
build.Default.GOPATH = oldGOPATH
build.Default.GOROOT = oldGOROOT
+ build.Default.Compiler = oldCompiler
}()
fn()