[go] math/big: test that Denom has no side effects in TestIssue34919

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Aug 10, 2026, 5:07:38 PM (13 hours ago) Aug 10
to Илья, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Dmitri Shuralyov, Dmitri Shuralyov, golang...@luci-project-accounts.iam.gserviceaccount.com, Neal Patel, Robert Griesemer, Robert Griesemer, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
math/big: test that Denom has no side effects in TestIssue34919

Rat.Denom no longer materializes the implicit denominator 1 into the
receiver: when x.b.abs is empty it returns a fresh &Int{abs: nat{1}}
rather than mutating x. The accessor is therefore side-effect free and
can be checked by TestIssue34919 alongside the other read-only
accessors.

Uncomment the Denom case and drop the stale TODO referencing the API
question from #33792.

Updates #33792
Change-Id: If631c662968ed38eab973c77cbfb65fe588b1288
Reviewed-by: Robert Griesemer <g...@google.com>
Auto-Submit: Robert Griesemer <g...@google.com>
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Files:
  • M src/math/big/rat_test.go
Change size: XS
Delta: 1 file changed, 1 insertion(+), 1 deletion(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: If631c662968ed38eab973c77cbfb65fe588b1288
Gerrit-Change-Number: 802142
Gerrit-PatchSet: 2
Gerrit-Owner: Илья <il.t...@gmail.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Neal Patel <ne...@golang.org>
Gerrit-Reviewer: Robert Griesemer <g...@golang.org>
Gerrit-Reviewer: Robert Griesemer <g...@google.com>
Gerrit-CC: Dmitri Shuralyov <dmit...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages