mirror of
https://github.com/golang/go
synced 2024-09-29 14:24:32 -06:00
internal/buildcfg: fix test for GOAMD64=v3 ./all.bash
If GOAMD64 is set to a bogus value, goamd64() will return the default value, which may not necessarily be 1. Instead, just test that it sets Error. Change-Id: Ibbc26608c1ae24e645c7753ef5765b9c2fdc089e Reviewed-on: https://go-review.googlesource.com/c/go/+/351129 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
ba1c52d7d7
commit
d7e3e442fe
@ -18,8 +18,9 @@ func TestConfigFlags(t *testing.T) {
|
||||
if goamd64() != 4 {
|
||||
t.Errorf("Wrong parsing of GOAMD64=v4")
|
||||
}
|
||||
Error = nil
|
||||
os.Setenv("GOAMD64", "1")
|
||||
if goamd64() != 1 {
|
||||
if goamd64(); Error == nil {
|
||||
t.Errorf("Wrong parsing of GOAMD64=1")
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user