diff --git a/.vscode/settings.json b/.vscode/settings.json index aea4fd5d..b5c7ba57 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -132,8 +132,5 @@ "background": "yellow" } }, - "[xml]": { - "editor.defaultFormatter": "DotJoshJohnson.xml" - }, "task.allowAutomaticTasks": "on" } diff --git a/README.md b/README.md index 8bef2bdb..fead2f8d 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ Not good enough for you?!: Edit your `.vscode/`[settings.json] file according to | `discovery.loadOnStartup` | If true, the extension will try to load all the tests after the startup. Otherwise the user has to click on the Test icon on the sidebar to trigger the process. | | `discovery.gracePeriodForMissing` | [seconds] Test executables are being watched (only inside the workspace directory). In case of one recompiles it will try to preserve the test states. If compilation reaches timeout it will drop the suite. | | `discovery.runtimeLimit` | [seconds] The timeout of the test-executable used to identify it (Calls the exec with `--help`). | -| `discovery.testListCaching` | (Experimental) In case your executable took too much time to list the tests, one can set this. It will preserve the output of `--gtest_list_tests --gtest_output=xml:...`. (Beware: Older Google Test doesn't support xml test list format.) | +| `discovery.testListCaching` | In case your executable took too much time to list the tests, one can set this. It will preserve the output of `--gtest_list_tests --gtest_output=xml:...`. (Beware: Older Google Test doesn't support xml test list format.) | | `discovery.strictPattern` | Test loading fails if one of the files matched by `test.executable` is not a test executable. (Helps noticing unexpected crashes/problems under test loading.) | | [debug.configTemplate] | Sets the necessary debug configurations and the debug button will work. | | `debug.breakOnFailure` | Debugger breaks on failure while debugging the test. Catch2: [--break](https://github.com/catchorg/Catch2/blob/master/docs/command-line.md#breaking-into-the-debugger); Google Test: [--gtest_break_on_failure](https://github.com/google/googletest/blob/master/googletest/docs/advanced.md#turning-assertion-failures-into-break-points); Doctest: [--no-breaks](https://github.com/onqtam/doctest/blob/master/doc/markdown/commandline.md) | diff --git a/src/Question.ts b/src/Question.ts index 8ecfeeeb..dea39eb2 100644 --- a/src/Question.ts +++ b/src/Question.ts @@ -2,7 +2,11 @@ import { request } from 'https'; import * as vscode from 'vscode'; export class Question { - constructor(id: number, readonly message: string, ...items: { text: string; link: string | undefined }[]) { + constructor( + id: number, + readonly message: string, + ...items: { text: string; link: string | undefined }[] + ) { this.items = items; } diff --git a/src/RunningExecutable.ts b/src/RunningExecutable.ts index 625cc0c3..f76da3aa 100644 --- a/src/RunningExecutable.ts +++ b/src/RunningExecutable.ts @@ -20,7 +20,10 @@ export enum ExecutableRunResultValue { /// export class ExecutableRunResult { - private constructor(readonly value: ExecutableRunResultValue, private readonly _error: string | undefined) {} + private constructor( + readonly value: ExecutableRunResultValue, + private readonly _error: string | undefined, + ) {} get Ok(): boolean { return this.value === ExecutableRunResultValue.OK; diff --git a/src/Spawner.ts b/src/Spawner.ts index d023274e..0e8fd83e 100644 --- a/src/Spawner.ts +++ b/src/Spawner.ts @@ -108,7 +108,10 @@ export class SpawnWithExecutor extends DefaultSpawner { private readonly _argsR2 = '${argsFlat}'; private readonly _argsStrR = '${argsStr}'; - constructor(private readonly _executor: string, private readonly _args?: ReadonlyArray) { + constructor( + private readonly _executor: string, + private readonly _args?: ReadonlyArray, + ) { super(); if (_args && !_args.some(x => x.indexOf(this._cmdR) != -1)) { diff --git a/src/Util.ts b/src/Util.ts index d8fc30d6..0ea41771 100644 --- a/src/Util.ts +++ b/src/Util.ts @@ -68,7 +68,11 @@ export class Version { return new Version(Number(major), minor ? Number(minor) : undefined, patch ? Number(patch) : undefined); } - constructor(readonly major: number, private readonly _minor?: number, private readonly _patch?: number) {} + constructor( + readonly major: number, + private readonly _minor?: number, + private readonly _patch?: number, + ) {} get minor(): number { return this._minor ? this._minor : 0; diff --git a/src/framework/Catch2/Catch2Executable.ts b/src/framework/Catch2/Catch2Executable.ts index b8d64144..cd326b3e 100644 --- a/src/framework/Catch2/Catch2Executable.ts +++ b/src/framework/Catch2/Catch2Executable.ts @@ -16,7 +16,10 @@ import { pipeOutputStreams2Parser, pipeOutputStreams2String, pipeProcess2Parser import { Readable } from 'stream'; export class Catch2Executable extends AbstractExecutable { - constructor(sharedVarOfExec: SharedVarOfExec, private readonly _catch2Version: Version | undefined) { + constructor( + sharedVarOfExec: SharedVarOfExec, + private readonly _catch2Version: Version | undefined, + ) { super(sharedVarOfExec, 'Catch2', _catch2Version); } diff --git a/src/framework/Framework.ts b/src/framework/Framework.ts index d143f8ea..b5beed7c 100644 --- a/src/framework/Framework.ts +++ b/src/framework/Framework.ts @@ -6,7 +6,10 @@ export type FrameworkType = 'catch2' | 'gtest' | 'doctest' | 'gbenchmark'; export type FrameworkId = FrameworkType | 'google-insider'; export class Framework { - constructor(readonly id: FrameworkId, readonly type: FrameworkType) { + constructor( + readonly id: FrameworkId, + readonly type: FrameworkType, + ) { this.testTag = new vscode.TestTag(`framework.${type}`); } diff --git a/src/framework/GoogleTest/GoogleTestExecutable.ts b/src/framework/GoogleTest/GoogleTestExecutable.ts index a17c7046..2c013922 100644 --- a/src/framework/GoogleTest/GoogleTestExecutable.ts +++ b/src/framework/GoogleTest/GoogleTestExecutable.ts @@ -19,7 +19,10 @@ import { pipeOutputStreams2Parser, pipeOutputStreams2String, pipeProcess2Parser import { Readable } from 'stream'; export class GoogleTestExecutable extends AbstractExecutable { - constructor(sharedVarOfExec: SharedVarOfExec, private readonly _argumentPrefix: string) { + constructor( + sharedVarOfExec: SharedVarOfExec, + private readonly _argumentPrefix: string, + ) { super(sharedVarOfExec, 'GoogleTest', undefined); } @@ -376,7 +379,10 @@ const testEndRe = (testId: string) => /// class TestCaseSharedData { - constructor(readonly shared: SharedVarOfExec, readonly builder: TestResultBuilder) {} + constructor( + readonly shared: SharedVarOfExec, + readonly builder: TestResultBuilder, + ) {} gMockWarningCount = 0; } diff --git a/src/util/TaskQueue.ts b/src/util/TaskQueue.ts index e49596c6..59b7e922 100644 --- a/src/util/TaskQueue.ts +++ b/src/util/TaskQueue.ts @@ -1,5 +1,8 @@ export class TaskQueue { - constructor(depends: Iterable = [], readonly name?: string) { + constructor( + depends: Iterable = [], + readonly name?: string, + ) { for (const dep of depends) { this._checkCircle(dep); this._depends.push(dep); diff --git a/src/util/TextStreamParser.ts b/src/util/TextStreamParser.ts index 7377eac7..192d7b6d 100644 --- a/src/util/TextStreamParser.ts +++ b/src/util/TextStreamParser.ts @@ -3,7 +3,11 @@ import { debugBreak } from './DevelopmentHelper'; import { ParserInterface } from './ParserInterface'; export class TextStreamParser implements ParserInterface { - constructor(private readonly log: Logger, rootProcessor: RootLineProcessor, private readonly handleStdErr = true) { + constructor( + private readonly log: Logger, + rootProcessor: RootLineProcessor, + private readonly handleStdErr = true, + ) { this.topProcessor = rootProcessor; } diff --git a/src/util/XmlParser.ts b/src/util/XmlParser.ts index 7f6a879f..db443e88 100644 --- a/src/util/XmlParser.ts +++ b/src/util/XmlParser.ts @@ -15,7 +15,11 @@ export class XmlParser implements ParserInterface { private readonly xmlTagProcessorStack: ProcessorFrame[] = []; private topTagProcessor: ProcessorFrame; - constructor(private readonly log: Logger, processor: XmlTagProcessor, onerrorCb: (error: Error) => void) { + constructor( + private readonly log: Logger, + processor: XmlTagProcessor, + onerrorCb: (error: Error) => void, + ) { { let resolver: () => void; this.endP = new Promise(resolve => (resolver = resolve));