Skip to content

Commit

Permalink
various improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
matepek committed Jan 10, 2024
1 parent 8442645 commit 1c5800b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down Expand Up @@ -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. |
Expand Down
2 changes: 1 addition & 1 deletion src/WorkspaceManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class WorkspaceManager implements vscode.Disposable {
},
},
{
resolve: /\$\{command:([^}]+)\}/,
resolve: /\$\{command:([^}]+)\}/, //TODO: add parameter options
rule: async (m: RegExpMatchArray): Promise<string> => {
try {
const ruleV = await vscode.commands.executeCommand<string>(m[1]);
Expand Down
2 changes: 1 addition & 1 deletion test/cpp/doctest/DOCTest.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/cpp/doctest/doctest1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 1c5800b

Please sign in to comment.