Skip to content

Commit a84f1fd

Browse files
committed
autorun pick fix
1 parent 99623c2 commit a84f1fd

File tree

5 files changed

+18
-12
lines changed

5 files changed

+18
-12
lines changed

Diff for: CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77
## [Unreleased]
88

9+
## [4.4.4]
10+
11+
### Fixed
12+
13+
- issue related to autorun feture.
14+
915
## [4.4.3] - 2023-06-06
1016

1117
### Fixed

Diff for: src/framework/AbstractExecutable.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ export abstract class AbstractExecutable<TestT extends AbstractTest = AbstractTe
8585
return this._tests.values();
8686
}
8787

88-
public hasTestWithId(id: string): boolean {
89-
if (this._execItem.getItem()?.id === id) return true;
90-
const found = this._tests.get(id);
91-
if (found) return true;
88+
public hasTestItem(item: vscode.TestItem): boolean {
89+
if (this._execItem.getItem() === item) return true;
90+
const found = this._tests.get(item.id);
91+
if (found?.item === item) return true;
9292
for (const test of this._tests.values()) {
93-
const found = test.hasSubTest(id);
93+
const found = test.hasSubTestItem(item);
9494
if (found) return true;
9595
}
9696
return false;

Diff for: src/framework/AbstractTest.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,12 @@ export abstract class AbstractTest {
151151

152152
private _subTests: Map<string /*id*/, SubTest> | undefined = undefined;
153153

154-
public hasSubTest(id: string): boolean {
154+
public hasSubTestItem(item: vscode.TestItem): boolean {
155155
if (this._subTests === undefined) return false;
156-
const found = this._subTests.get(id);
157-
if (found !== undefined) return true;
156+
const found = this._subTests.get(item.id);
157+
if (found?.item === item) return true;
158158
for (const subTest of this._subTests.values()) {
159-
const found = subTest.hasSubTest(id);
159+
const found = subTest.hasSubTestItem(item);
160160
if (found) return true;
161161
}
162162
return false;

Diff for: src/framework/Catch2/Catch2Executable.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -707,8 +707,8 @@ class ExpressionProcessor implements XmlTagProcessor {
707707
this.builder.addMessageWithOutput(
708708
this.attribs.filename,
709709
this.attribs.line,
710-
`${this.attribs.type} threw an exception: \`${this.exception}\``,
711-
'Original: ' + this.original,
710+
(this.attribs.type ?? `Expression`) + ` threw an exception \`${this.exception}\``,
711+
this.original ?? '',
712712
);
713713
} else {
714714
this.builder.addExpressionMsg(

Diff for: src/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
177177
} else {
178178
for (const item of request.include) {
179179
for (const e of executables) {
180-
if (e.hasTestWithId(item.id)) {
180+
if (e.hasTestItem(item)) {
181181
include.push(item);
182182
break;
183183
}

0 commit comments

Comments
 (0)