Skip to content

Commit

Permalink
math/big: disable TestNewIntAllocs on noopt builder
Browse files Browse the repository at this point in the history
Since when that test requires inlining, which is disabled on noopt
builder.

Updates #29951

Change-Id: I9d7a0a64015a30d3bfb5ad5d806ea0955657fda3
Reviewed-on: https://go-review.googlesource.com/c/go/+/422039
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
  • Loading branch information
cuonglm authored and gopherbot committed Aug 8, 2022
1 parent c1bfefe commit 7e5e4a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/math/big/int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"bytes"
"encoding/hex"
"fmt"
"internal/testenv"
"math"
"math/rand"
"strconv"
Expand Down Expand Up @@ -1905,6 +1906,9 @@ func TestNewIntMinInt64(t *testing.T) {
}

func TestNewIntAllocs(t *testing.T) {
if strings.HasSuffix(testenv.Builder(), "-noopt") {
t.Skip("inlining is disabled on noopt builder")
}
for _, n := range []int64{0, 7, -7, 1 << 30, -1 << 30, 1 << 50, -1 << 50} {
x := NewInt(3)
got := testing.AllocsPerRun(100, func() {
Expand Down

0 comments on commit 7e5e4a7

Please sign in to comment.