Skip to content

Commit

Permalink
autorun pick fix
Browse files Browse the repository at this point in the history
  • Loading branch information
matepek committed Jun 7, 2023
1 parent 99623c2 commit a84f1fd
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

## [4.4.4]

### Fixed

- issue related to autorun feture.

This comment has been minimized.

Copy link
@zowers

zowers Jun 7, 2023

typo feture


## [4.4.3] - 2023-06-06

### Fixed
Expand Down
10 changes: 5 additions & 5 deletions src/framework/AbstractExecutable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ export abstract class AbstractExecutable<TestT extends AbstractTest = AbstractTe
return this._tests.values();
}

public hasTestWithId(id: string): boolean {
if (this._execItem.getItem()?.id === id) return true;
const found = this._tests.get(id);
if (found) return true;
public hasTestItem(item: vscode.TestItem): boolean {
if (this._execItem.getItem() === item) return true;
const found = this._tests.get(item.id);
if (found?.item === item) return true;
for (const test of this._tests.values()) {
const found = test.hasSubTest(id);
const found = test.hasSubTestItem(item);
if (found) return true;
}
return false;
Expand Down
8 changes: 4 additions & 4 deletions src/framework/AbstractTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ export abstract class AbstractTest {

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

public hasSubTest(id: string): boolean {
public hasSubTestItem(item: vscode.TestItem): boolean {
if (this._subTests === undefined) return false;
const found = this._subTests.get(id);
if (found !== undefined) return true;
const found = this._subTests.get(item.id);
if (found?.item === item) return true;
for (const subTest of this._subTests.values()) {
const found = subTest.hasSubTest(id);
const found = subTest.hasSubTestItem(item);
if (found) return true;
}
return false;
Expand Down
4 changes: 2 additions & 2 deletions src/framework/Catch2/Catch2Executable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -707,8 +707,8 @@ class ExpressionProcessor implements XmlTagProcessor {
this.builder.addMessageWithOutput(
this.attribs.filename,
this.attribs.line,
`${this.attribs.type} threw an exception: \`${this.exception}\``,
'Original: ' + this.original,
(this.attribs.type ?? `Expression`) + ` threw an exception \`${this.exception}\``,
this.original ?? '',
);
} else {
this.builder.addExpressionMsg(
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
} else {
for (const item of request.include) {
for (const e of executables) {
if (e.hasTestWithId(item.id)) {
if (e.hasTestItem(item)) {
include.push(item);
break;
}
Expand Down

0 comments on commit a84f1fd

Please sign in to comment.