Skip to content

Commit

Permalink
support table test
Browse files Browse the repository at this point in the history
  • Loading branch information
moricho committed Sep 4, 2020
1 parent d1ab6fe commit 255baa9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 1 addition & 3 deletions testdata/src/sample/cleanup_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package sample

import (
"testing"
)
import "testing"

func Test_Cleanup1(t *testing.T) { // want "Test_Cleanup1 should use t.Cleanup"
teardown := setup("Test_Cleanup1")
Expand Down
3 changes: 3 additions & 0 deletions tparallel.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ func appendTestMap(subtests []*ssa.Function, instr ssa.Instruction) []*ssa.Funct
switch arg := arg.(type) {
case *ssa.Function:
subtests = append(subtests, arg)
case *ssa.MakeClosure:
fn, _ := arg.Fn.(*ssa.Function)
subtests = append(subtests, fn)
}
}

Expand Down

0 comments on commit 255baa9

Please sign in to comment.