mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
internal/testenv: add and use OptimizationOff/SkipIfOptimizationOff
So we don't have to duplicate the logic to detect noopt builder in multiple places. Based on khr@'s suggestion in CL 422037. Change-Id: Idb338e8bc08cdf00460574bfc0d2f7018c79bbd5 Reviewed-on: https://go-review.googlesource.com/c/go/+/422038 Reviewed-by: Than McIntosh <thanm@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
This commit is contained in:
parent
98277f30e4
commit
a292b3905c
9 changed files with 28 additions and 25 deletions
|
|
@ -364,7 +364,7 @@ func TestMapIterSet(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
if strings.HasSuffix(testenv.Builder(), "-noopt") {
|
||||
if testenv.OptimizationOff() {
|
||||
return // no inlining with the noopt builder
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue