1.. title:: clang-tidy - google-readability-avoid-underscore-in-googletest-name
2
3google-readability-avoid-underscore-in-googletest-name
4======================================================
5
6Checks whether there are underscores in googletest test suite names and test
7names in test macros:
8
9- ``TEST``
10- ``TEST_F``
11- ``TEST_P``
12- ``TYPED_TEST``
13- ``TYPED_TEST_P``
14
15The ``FRIEND_TEST`` macro is not included.
16
17For example:
18
19.. code-block:: c++
20
21  TEST(TestSuiteName, Illegal_TestName) {}
22  TEST(Illegal_TestSuiteName, TestName) {}
23
24would trigger the check. `Underscores are not allowed`_ in test suite name nor
25test names.
26
27The ``DISABLED_`` prefix, which may be used to
28`disable test suites and individual tests`_, is removed from the test suite name
29and test name before checking for underscores.
30
31This check does not propose any fixes.
32
33.. _Underscores are not allowed: https://google.github.io/googletest/faq.html#why-should-test-suite-names-and-test-names-not-contain-underscore
34.. _disable test suites and individual tests: https://google.github.io/googletest/advanced.html#temporarily-disabling-tests
35