We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47a5f7d commit a8d0fa5Copy full SHA for a8d0fa5
go/packages/packages_test.go
@@ -3212,6 +3212,8 @@ func foo() int {
3212
3213
// TestDirAndForTest tests the new fields added as part of golang/go#38445.
3214
func TestDirAndForTest(t *testing.T) {
3215
+ testenv.NeedsGoPackages(t)
3216
+
3217
dir := writeTree(t, `
3218
-- go.mod --
3219
module example.com
@@ -3232,15 +3234,13 @@ func Bar() int { return 2 }
3232
3234
package a_test
3233
3235
3236
import (
- "testing"
-
3237
"example.com/a"
3238
"example.com/b"
3239
)
3240
3241
-func TestFooBar(t *testing.T) {
+func _() {
3242
if got := a.Foo() + a.Bar() + b.Baz(); got != 6 {
3243
- t.Errorf("whoops!")
+ panic("whoops")
3244
}
3245
3246
0 commit comments