File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1414
1515import * as vscode from "vscode" ;
1616import { reduceTestItemChildren } from "./TestUtils" ;
17+ import { TestRunProxy } from "./TestRunner" ;
1718
1819type ProcessResult = {
1920 testItems : vscode . TestItem [ ] ;
@@ -93,7 +94,7 @@ export class TestRunArguments {
9394 const terminator = hasChildren ? "/" : "$" ;
9495 // Debugging XCTests requires exact matches, so we don't need a trailing terminator.
9596 return isDebug ? arg . id : `${ arg . id } ${ terminator } ` ;
96- } else if ( hasChildren ) {
97+ } else if ( hasChildren && ! this . hasParameterizedTestChildren ( arg ) ) {
9798 // Append a trailing slash to match a suite name exactly.
9899 // This prevents TestTarget.MySuite matching TestTarget.MySuite2.
99100 return `${ arg . id } /` ;
@@ -102,6 +103,12 @@ export class TestRunArguments {
102103 } ) ;
103104 }
104105
106+ private hasParameterizedTestChildren ( testItem : vscode . TestItem ) : boolean {
107+ return Array . from ( testItem . children ) . some ( arr =>
108+ arr [ 1 ] . tags . some ( tag => tag . id === TestRunProxy . Tags . PARAMETERIZED_TEST_RESULT )
109+ ) ;
110+ }
111+
105112 private createTestItemReducer (
106113 include : readonly vscode . TestItem [ ] ,
107114 exclude : readonly vscode . TestItem [ ] ,
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ export class TestRunProxy {
164164 // https://github.com/swiftlang/swift-testing/issues/671 is resolved.
165165 testClass . tags = compactMap ( parent . tags , t =>
166166 t . id === runnableTag . id ? null : new vscode . TestTag ( t . id )
167- ) ;
167+ ) . concat ( new vscode . TestTag ( TestRunProxy . Tags . PARAMETERIZED_TEST_RESULT ) ) ;
168168
169169 const added = upsertTestItem ( this . controller , testClass , parent ) ;
170170
@@ -406,9 +406,10 @@ export class TestRunProxy {
406406 await this . coverage . computeCoverage ( this . testRun ) ;
407407 }
408408
409- private static Tags = {
409+ static Tags = {
410410 SKIPPED : "skipped" ,
411411 HAS_ATTACHMENT : "hasAttachment" ,
412+ PARAMETERIZED_TEST_RESULT : "parameterizedTestResult" ,
412413 } ;
413414
414415 // Remove any tags that were added due to test results
You can’t perform that action at this time.
0 commit comments