[go] test: correct test output formatting in strength.go

4 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Dec 26, 2025, 10:40:34 AM (2 days ago) Dec 26
to Gerrit Bot, Jorge Pinto, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gopher Robot added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Gopher Robot . unresolved

I spotted some possible problems with your PR:

  1. Are you describing the change in complete sentences with correct punctuation in the commit message body, including ending sentences with periods?
2. You usually need to reference a bug number for all but trivial or cosmetic fixes. For this repo, the format is usually 'Fixes #12345' or 'Updates #12345' at the end of the commit message. Should you have a bug reference?

Please address any problems by updating the GitHub PR.

When complete, mark this comment as 'Done' and click the [blue 'Reply' button](https://go.dev/wiki/GerritBot#i-left-a-reply-to-a-comment-in-gerrit-but-no-one-but-me-can-see-it) above. These findings are based on heuristics; if a finding does not apply, briefly reply here saying so.

To update the commit title or commit message body shown here in Gerrit, you must edit the GitHub PR title and PR description (the first comment) in the GitHub web interface using the 'Edit' button or 'Edit' menu entry there. Note: pushing a new commit to the PR will not automatically update the commit message used by Gerrit.

For more details, see:

(In general for Gerrit code reviews, the change author is expected to [log in to Gerrit](https://go-review.googlesource.com/login/) with a Gmail or other Google account and then close out each piece of feedback by marking it as 'Done' if implemented as suggested or otherwise reply to each review comment. See the [Review](https://go.dev/doc/contribute#review) section of the Contributing Guide for details.)

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I63b39c5fa137686c90f6e68578b28710619d97db
Gerrit-Change-Number: 732741
Gerrit-PatchSet: 1
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-CC: Gopher Robot <go...@golang.org>
Gerrit-CC: Jorge Pinto <jorg...@gmail.com>
Gerrit-Comment-Date: Fri, 26 Dec 2025 15:40:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Gerrit Bot (Gerrit)

unread,
Dec 26, 2025, 10:40:34 AM (2 days ago) Dec 26
to goph...@pubsubhelper.golang.org, Jorge Pinto, golang-co...@googlegroups.com

Gerrit Bot has uploaded the change for review

Commit message

test: correct test output formatting in strength.go

The generated failure messages in strength.go use "wanted" instead of
the idiomatic "want" and follow a non-standard format
Change-Id: I63b39c5fa137686c90f6e68578b28710619d97db
GitHub-Last-Rev: 7cf8b66823c0c1b46ba7c701f2016279b0636ebe
GitHub-Pull-Request: golang/go#77002

Change diff

diff --git a/test/strength.go b/test/strength.go
index 823d05a..4276be1 100644
--- a/test/strength.go
+++ b/test/strength.go
@@ -19,7 +19,7 @@
for i := 0; i < 200; i++ {
fmt.Printf(` if want, got := int%d(%d), s*%d; want != got {
failed = true
- fmt.Printf("got %d * %%d == %%d, wanted %d\n", s, got)
+ fmt.Printf("s*%d = %%d, want %%d (s=%%d)\n", got, want, s)
}
`, bits, want, i, i, want)
want += fact

Change information

Files:
  • M test/strength.go
Change size: XS
Delta: 1 file changed, 1 insertion(+), 1 deletion(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newchange
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I63b39c5fa137686c90f6e68578b28710619d97db
    Gerrit-Change-Number: 732741
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-CC: Jorge Pinto <jorg...@gmail.com>
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    Ian Lance Taylor (Gerrit)

    unread,
    Dec 26, 2025, 11:28:25 AM (2 days ago) Dec 26
    to Gerrit Bot, Jorge Pinto, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com

    Ian Lance Taylor added 1 comment

    Patchset-level comments
    Ian Lance Taylor . resolved

    Thanks, but as a general rule we don't change existing test files.

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: I63b39c5fa137686c90f6e68578b28710619d97db
      Gerrit-Change-Number: 732741
      Gerrit-PatchSet: 1
      Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
      Gerrit-CC: Gopher Robot <go...@golang.org>
      Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
      Gerrit-CC: Jorge Pinto <jorg...@gmail.com>
      Gerrit-Comment-Date: Fri, 26 Dec 2025 16:28:21 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      unsatisfied_requirement
      open
      diffy

      Jorge Pinto (Gerrit)

      unread,
      Dec 26, 2025, 11:56:30 AM (2 days ago) Dec 26
      to Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
      Attention needed from Ian Lance Taylor

      Jorge Pinto added 1 comment

      Patchset-level comments
      Ian Lance Taylor . resolved

      Thanks, but as a general rule we don't change existing test files.

      Jorge Pinto

      ok.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ian Lance Taylor
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: I63b39c5fa137686c90f6e68578b28710619d97db
      Gerrit-Change-Number: 732741
      Gerrit-PatchSet: 1
      Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
      Gerrit-CC: Gopher Robot <go...@golang.org>
      Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
      Gerrit-CC: Jorge Pinto <jorg...@gmail.com>
      Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
      Gerrit-Comment-Date: Fri, 26 Dec 2025 16:56:27 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Ian Lance Taylor <ia...@golang.org>
      unsatisfied_requirement
      open
      diffy

      Jorge Pinto (Gerrit)

      unread,
      Dec 26, 2025, 11:56:53 AM (2 days ago) Dec 26
      to Gerrit Bot, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Gopher Robot, golang-co...@googlegroups.com
      Attention needed from Ian Lance Taylor

      Jorge Pinto added 1 comment

      Patchset-level comments
      Gopher Robot . resolved

      I spotted some possible problems with your PR:

        1. Are you describing the change in complete sentences with correct punctuation in the commit message body, including ending sentences with periods?
      2. You usually need to reference a bug number for all but trivial or cosmetic fixes. For this repo, the format is usually 'Fixes #12345' or 'Updates #12345' at the end of the commit message. Should you have a bug reference?

      Please address any problems by updating the GitHub PR.

      When complete, mark this comment as 'Done' and click the [blue 'Reply' button](https://go.dev/wiki/GerritBot#i-left-a-reply-to-a-comment-in-gerrit-but-no-one-but-me-can-see-it) above. These findings are based on heuristics; if a finding does not apply, briefly reply here saying so.

      To update the commit title or commit message body shown here in Gerrit, you must edit the GitHub PR title and PR description (the first comment) in the GitHub web interface using the 'Edit' button or 'Edit' menu entry there. Note: pushing a new commit to the PR will not automatically update the commit message used by Gerrit.

      For more details, see:

      (In general for Gerrit code reviews, the change author is expected to [log in to Gerrit](https://go-review.googlesource.com/login/) with a Gmail or other Google account and then close out each piece of feedback by marking it as 'Done' if implemented as suggested or otherwise reply to each review comment. See the [Review](https://go.dev/doc/contribute#review) section of the Contributing Guide for details.)

      Jorge Pinto

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ian Lance Taylor
      Submit Requirements:
        • requirement is not satisfiedCode-Review
        • requirement satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: I63b39c5fa137686c90f6e68578b28710619d97db
        Gerrit-Change-Number: 732741
        Gerrit-PatchSet: 1
        Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
        Gerrit-CC: Gopher Robot <go...@golang.org>
        Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
        Gerrit-CC: Jorge Pinto <jorg...@gmail.com>
        Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
        Gerrit-Comment-Date: Fri, 26 Dec 2025 16:56:49 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Gopher Robot <go...@golang.org>
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages