Skip to content

Commit

Permalink
use slices.ContainsFunc and better comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dnephin committed Sep 13, 2024
1 parent 74bf4e7 commit 733d187
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions testjson/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ func rootTestPassed(p *Package, subtest TestCase) bool {
continue
}

// A TestCase name can exist more than once in an Execution due to
// the go test -count=n flag or when the input contains multiple separate
// test runs.
// Check the testcase has the correct ID for this subtest.
for _, subID := range p.subTests[tc.ID] {
if subID == subtest.ID {
return true
Expand Down

0 comments on commit 733d187

Please sign in to comment.