5 // This test exercises the synthesis of testmain packages for tests.
6 // The test framework doesn't directly let us perform negative
7 // assertions (i.e. that TestingQuux isn't called, or that its
8 // parameter's PTS is empty) so this test is rather roundabout.
12 func log(f func(*testing.T)) {
13 // The PTS of f is the set of called tests. TestingQuux is not present.
14 print(f) // @pointsto main.Test | main.TestFoo
17 func Test(t *testing.T) {
18 // Don't assert @pointsto(t) since its label contains a fragile line number.
22 func TestFoo(t *testing.T) {
23 // Don't assert @pointsto(t) since its label contains a fragile line number.
27 func TestingQuux(t *testing.T) {
28 // We can't assert @pointsto(t) since this is dead code.
32 func BenchmarkFoo(b *testing.B) {
38 // Excludes TestingQuux.
39 // @calls testing.tRunner -> main.Test
40 // @calls testing.tRunner -> main.TestFoo
41 // @calls testing.runExample -> main.ExampleBar
42 // @calls (*testing.B).runN -> main.BenchmarkFoo