Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e944749

Browse filesBrowse files
danbevtargos
authored andcommitted
doc: add example of using filter with cctest
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>
1 parent 5cd78ba commit e944749
Copy full SHA for e944749

File tree

Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed
Open diff view settings
Collapse file

‎doc/guides/writing-tests.md‎

Copy file name to clipboardExpand all lines: doc/guides/writing-tests.md
+10Lines changed: 10 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,16 @@ The test can be executed by running the `cctest` target:
403403
$ make cctest
404404
```
405405

406+
A filter can be applied to run single/multiple test cases:
407+
```console
408+
$ make cctest GTEST_FILTER=EnvironmentTest.AtExitWithArgument
409+
```
410+
411+
`cctest` can also be run directly which can be useful when debugging:
412+
```console
413+
$ out/Release/cctest --gtest_filter=EnvironmentTest.AtExit*
414+
```
415+
406416
### Node.js test fixture
407417
There is a [test fixture][] named `node_test_fixture.h` which can be included by
408418
unit tests. The fixture takes care of setting up the Node.js environment

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.