Skip to content

Commit

Permalink
doc: add example of using filter with cctest
Browse files Browse the repository at this point in the history
This commit adds examples of specifying filters when running cctest.
This can be useful when debugging and limiting the test cases run to
the test cases of interest and I think worth documenting.

PR-URL: #21401
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
danbev committed Jun 21, 2018
1 parent 883e1cd commit b56f65e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doc/guides/writing-tests.md
Expand Up @@ -403,6 +403,16 @@ The test can be executed by running the `cctest` target:
$ make cctest
```

A filter can be applied to run single/multiple test cases:
```console
$ make cctest GTEST_FILTER=EnvironmentTest.AtExitWithArgument
```

`cctest` can also be run directly which can be useful when debugging:
```console
$ out/Release/cctest --gtest_filter=EnvironmentTest.AtExit*
```

### Node.js test fixture
There is a [test fixture][] named `node_test_fixture.h` which can be included by
unit tests. The fixture takes care of setting up the Node.js environment
Expand Down

0 comments on commit b56f65e

Please sign in to comment.