...
1[short] skip
2[compiler:gccgo] skip
3
4# coverdep2/p1's xtest imports coverdep2/p2 which imports coverdep2/p1.
5# Make sure that coverage on coverdep2/p2 recompiles coverdep2/p2.
6
7go test -short -cover coverdep2/p1
8stdout 'coverage: 100.0% of statements' # expect 100.0% coverage
9
10-- go.mod --
11module coverdep2
12
13go 1.16
14-- p1/p.go --
15package p1
16
17func F() int { return 1 }
18-- p1/p_test.go --
19package p1_test
20
21import (
22 "coverdep2/p2"
23 "testing"
24)
25
26func Test(t *testing.T) {
27 p2.F()
28}
29-- p2/p2.go --
30package p2
31
32import "coverdep2/p1"
33
34func F() {
35 p1.F()
36}
View as plain text