File: osarch_suffix.txt

package info (click to toggle)
golang-golang-x-tools 1%3A0.25.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 22,724 kB
  • sloc: javascript: 2,027; asm: 1,645; sh: 166; yacc: 155; makefile: 49; ansic: 8
file content (46 lines) | stat: -rw-r--r-- 1,021 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
This test verifies that we add an [os,arch] suffix to each diagnostic
that doesn't appear in the default build (=runtime.{GOOS,GOARCH}).

See golang/go#65496.

The two p/*.go files below are written to trigger the same diagnostic
(range, message, source, etc) but varying only by URI.

In the q test, a single location in the common code q.go has two
diagnostics, one of which is tagged.

This test would fail on openbsd/mips64 because it will be
the same as the default build, so we skip that platform.

-- flags --
-skip_goos=openbsd

-- go.mod --
module example.com

-- p/p.go --
package p

var _ fmt.Stringer //@diag("fmt", re"unde.*: fmt$")

-- p/p_openbsd_mips64.go --
package p

var _ fmt.Stringer //@diag("fmt", re"unde.*: fmt \\[openbsd,mips64\\]")

-- q/q_default.go --
//+build !openbsd && !mips64

package q

func f(int) int

-- q/q_openbsd_mips64.go --
package q

func f(string) int

-- q/q.go --
package q

var _ = f() //@ diag(")", re`.*want \(string\) \[openbsd,mips64\]`), diag(")", re`.*want \(int\)$`)