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 <[email protected]>
  • Loading branch information
danbev authored and targos committed Jun 22, 2018
1 parent 5cd78ba commit e944749
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doc/guides/writing-tests.md
Original file line number Diff line number Diff line change
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 e944749

Please sign in to comment.