Skip to content

Commit

Permalink
master: advanced catch2 tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
Mate Pek committed Jan 8, 2022
1 parent 61150ed commit 4f4c98e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 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.0.20]

### Added

- experimental advanced tag support

## [4.0.19] - 2022-01-08

### Added
Expand Down
10 changes: 8 additions & 2 deletions src/AbstractTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ export abstract class AbstractTest {
}

private _calcTags(): vscode.TestTag[] {
const tags = [this._frameworkTag, ...this._tags.map(x => new vscode.TestTag(x))];
const tags = [
this._frameworkTag,
new vscode.TestTag(`level.` + this.subLevel),
...this._tags.map(x => new vscode.TestTag(`tag."${x}"`)),
];
this.skipped && tags.push(SharedTestTags.skipped);
if (!this._staticError) {
this.runnable && tags.push(SharedTestTags.runnable);
Expand Down Expand Up @@ -174,6 +178,7 @@ export abstract class AbstractTest {
label,
resolvedFile,
line,
this._tags,
this._frameworkTag,
this.subLevel + 1,
enableRunAndDebug,
Expand Down Expand Up @@ -219,6 +224,7 @@ export class SubTest extends AbstractTest {
label: string | undefined,
file: string | undefined,
line: string | undefined,
tags: string[],
frameworkTag: vscode.TestTag,
level: number,
private readonly enableRunAndDebug: boolean,
Expand All @@ -233,7 +239,7 @@ export class SubTest extends AbstractTest {
false,
undefined,
undefined,
[],
tags,
frameworkTag,
enableRunAndDebug,
enableRunAndDebug,
Expand Down

0 comments on commit 4f4c98e

Please sign in to comment.