[tools] gopls/internal/golang: support variadic functions and constructors in generated tests

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Dec 8, 2025, 5:42:31 PM (4 days ago) Dec 8
to Gerrit Bot, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, David Chase, Hongxiang Jiang, Go LUCI, Ilya Ilyinykh, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
gopls/internal/golang: add support for variadic functions and constructors in generated tests

Add IsVariadic flag to function metadata and expand variadic arguments with ...
in test templates.

Update constructor handling to propagate variadic information.

Fixes golang/go#76682
Change-Id: I3cab68e8729fe9092dedd2b1a40a1cbce79fb41b
GitHub-Last-Rev: acb706d0ca00af12405b5adecce5d2bcc0429af1
GitHub-Pull-Request: golang/tools#609
Reviewed-by: David Chase <drc...@google.com>
Reviewed-by: Hongxiang Jiang <hxj...@golang.org>
Auto-Submit: Hongxiang Jiang <hxj...@golang.org>
Files:
  • M gopls/internal/golang/addtest.go
  • M gopls/internal/test/marker/testdata/codeaction/addtest.txt
Change size: M
Delta: 2 files changed, 210 insertions(+), 5 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Hongxiang Jiang, +1 by David Chase
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: tools
Gerrit-Branch: master
Gerrit-Change-Id: I3cab68e8729fe9092dedd2b1a40a1cbce79fb41b
Gerrit-Change-Number: 727280
Gerrit-PatchSet: 5
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-Reviewer: David Chase <drc...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
Gerrit-CC: Ilya Ilyinykh <ilya...@gmail.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages