GoogleTest: How to skip a test?

前端 未结 8 952
情歌与酒
情歌与酒 2020-12-04 08:09

Using Google Test 1.6 (Windows 7, Visual Studio C++). How can I turn off a given test? (aka how can I prevent a test from running). Is there anything I can do besides comm

8条回答
  •  执念已碎
    2020-12-04 09:03

    Here's the expression to include tests whose names have the strings foo1 or foo2 in them and exclude tests whose names have the strings bar1 or bar2 in them:

    --gtest_filter=*foo1*:*foo2*-*bar1*:*bar2*
    

提交回复
热议问题