Repository navigation
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
ege-arhan
left a comment
There was a problem hiding this comment.
The new test in src/fmt/fmt_test.go is not gofmted, so all.bash/the fmt CI shard will fail before the test can report anything:
$ gofmt -d src/fmt/fmt_test.go
@@ -2044,9 +2044,9 @@
- got := Sprintf("[%v]", "test-edge-case")
- want := "[test-edge-case]"
- if got != want {
- t.Errorf("Sprintf edge case failed: got %q, want %q", got, want)
- }
+ got := Sprintf("[%v]", "test-edge-case")
...
The file also lacks the trailing newline (the diff ends with \ No newline at end of file).
Beyond formatting: fmt.Sprintf("[%v]", "test-edge-case") is already covered by the fmtTests table ({"[%v]", []any{"hi"}, "[hi]"} and friends), so the assertion cannot fail for any implementation that passes the existing table, including a deliberately broken %v. A test for the described scenario ("malformed verb wrapping") needs input that the table does not already pin, and it belongs in the table as a new entry rather than a standalone Test* function. Sprintf is also referenced without the fmt. qualifier — that only compiles inside package fmt, not in fmt_test.go (package fmt_test).
Also please drop the unedited PR template text in the description, per CONTRIBUTING.md.
|
Correction to my previous comment: The rest stands: the trailing-newline/gofmt failure is real ( |
…cation
This PR will be imported into Gerrit with the title and first
comment (this text) used to generate the subject and body of
the Gerrit change.
Please ensure you adhere to every item in this list.
More info can be found at https://go.dev/wiki/CommitMessage
net/http: frob the quux before blarfing"This change modifies Go to ___________"
really needed (ASCII art, table, or long link)
Fixes #1234orUpdates #1234(the latter if this is not a complete fix) to this comment
golang/goyou can use theowner/repo#issue_numbersyntax:Fixes golang/vscode-go#1234Our Gerrit server & GitHub bots enforce CLA compliance instead.