From 1c5800b00544756674b77d49abf3bf6f1da2f039 Mon Sep 17 00:00:00 2001 From: Mate Pek Date: Wed, 10 Jan 2024 10:12:48 +0700 Subject: [PATCH] various improvements --- .vscode/settings.json | 8 +++++++- README.md | 6 +++--- src/WorkspaceManager.ts | 2 +- test/cpp/doctest/DOCTest.cmake | 2 +- test/cpp/doctest/doctest1.cpp | 2 +- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index b5c7ba57..763115f4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -132,5 +132,11 @@ "background": "yellow" } }, - "task.allowAutomaticTasks": "on" + "task.allowAutomaticTasks": "on", + "search.exclude": { + "**/node_modules": true, + "**/bower_components": true, + "**/*.code-search": true, + "/package-lock.json": true + } } diff --git a/README.md b/README.md index fead2f8d..c234a607 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This extension allows you to run your [Catch2](https://github.com/catchorg/Catch2), [Google Test](https://github.com/google/googletest) -and [DOCtest](https://github.com/onqtam/doctest) +and [DOCtest](https://github.com/doctest/doctest) tests using the native testing vscode-api. It also have basic support for [Google Benchmark](https://github.com/google/benchmark). @@ -62,10 +62,10 @@ 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` | 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) | +| `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/doctest/doctest/blob/master/doc/markdown/commandline.md) | | `debug.noThrow` | Skips all assertions that test that an exception is thrown, e.g. REQUIRE_THROWS. This is a Catch2 parameter: [--nothrow](https://github.com/catchorg/Catch2/blob/master/docs/command-line.md#eliding-assertions-expected-to-throw); | | `log.logpanel` | Creates a new output channel and write the log messages there. For debugging. Enabling it could slow down your vscode. | | `log.logfile` | Writes the log message into the given file. Empty means disabled. | diff --git a/src/WorkspaceManager.ts b/src/WorkspaceManager.ts index 8e80df53..354ff08c 100644 --- a/src/WorkspaceManager.ts +++ b/src/WorkspaceManager.ts @@ -58,7 +58,7 @@ export class WorkspaceManager implements vscode.Disposable { }, }, { - resolve: /\$\{command:([^}]+)\}/, + resolve: /\$\{command:([^}]+)\}/, //TODO: add parameter options rule: async (m: RegExpMatchArray): Promise => { try { const ruleV = await vscode.commands.executeCommand(m[1]); diff --git a/test/cpp/doctest/DOCTest.cmake b/test/cpp/doctest/DOCTest.cmake index b19159a1..529c1506 100644 --- a/test/cpp/doctest/DOCTest.cmake +++ b/test/cpp/doctest/DOCTest.cmake @@ -1,7 +1,7 @@ include(FetchContent) FetchContent_Declare(doctest - GIT_REPOSITORY https://github.com/onqtam/doctest.git + GIT_REPOSITORY https://github.com/doctest/doctest.git GIT_TAG 2.4.7) FetchContent_GetProperties(doctest) diff --git a/test/cpp/doctest/doctest1.cpp b/test/cpp/doctest/doctest1.cpp index 8036734a..0c01e673 100644 --- a/test/cpp/doctest/doctest1.cpp +++ b/test/cpp/doctest/doctest1.cpp @@ -106,7 +106,7 @@ static void checks(int data) { DOCTEST_SUBCASE("check data 2") { REQUIRE(data % 4 == 0); } } -TEST_CASE("Nested - related to https://github.com/onqtam/doctest/issues/282") { +TEST_CASE("Nested - related to https://github.com/doctest/doctest/issues/282") { DOCTEST_SUBCASE("generate data variant 1") { int data(44);