cmd/api/testdata: add test case for issue 79145

In this example, Tau is not deprecated, and Old is deprecated.
The current cmd/api check produces false reports in both cases.
The next CL fixes this.

For #79145.

Change-Id: I670fa01bb67d7ee58f1bcca9061494bd9b0105bf
Reviewed-on: https://go-review.googlesource.com/c/go/+/774880
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
This commit is contained in:
Dmitri Shuralyov 2026-05-06 11:28:52 -04:00 committed by Gopher Robot
parent f03f2ab67a
commit deee1b75cf
2 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,5 @@
pkg issue79145, const Tau //deprecated
pkg issue79145, const Tau = 6.28319 // 314159265358979323846264338327950288419716939937510582097494459/50000000000000000000000000000000000000000000000000000000000000
pkg issue79145, const Tau ideal-float
pkg issue79145, const Old = true
pkg issue79145, const Old ideal-bool

View file

@ -0,0 +1,14 @@
package issue79145
// Tau is the constant τ, which equals to 6.283185... or 2π. Tau is not
// Deprecated: please find more information at https://oeis.org/A019692.
const Tau = 2 * pi
const pi = 3.14159265358979323846264338327950288419716939937510582097494459 // https://oeis.org/A000796; like math.Pi
/*
Old is something old.
Deprecated: Use New instead.
*/
const Old = true