mirror of
https://github.com/golang/go.git
synced 2026-06-28 03:40:37 +00:00
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:
parent
f03f2ab67a
commit
deee1b75cf
2 changed files with 19 additions and 0 deletions
5
src/cmd/api/testdata/src/pkg/issue79145/golden.txt
vendored
Normal file
5
src/cmd/api/testdata/src/pkg/issue79145/golden.txt
vendored
Normal 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
|
||||
14
src/cmd/api/testdata/src/pkg/issue79145/issue79145.go
vendored
Normal file
14
src/cmd/api/testdata/src/pkg/issue79145/issue79145.go
vendored
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue