C++/CUDA: true when name is a GoogleTest test-definition macro whose * invocations parse as function definitions with bare-identifier parameters. * Multiple such macros in one file all share the extracted name (e.g. "TEST"), * causing qualified-name collisions and node loss (#1266). */
| 5491 | * Multiple such macros in one file all share the extracted name (e.g. "TEST"), |
| 5492 | * causing qualified-name collisions and node loss (#1266). */ |
| 5493 | static bool is_cpp_test_macro(const char *name) { |
| 5494 | return strcmp(name, "TEST") == 0 || strcmp(name, "TEST_F") == 0 || |
| 5495 | strcmp(name, "TEST_P") == 0 || strcmp(name, "TYPED_TEST") == 0 || |
| 5496 | strcmp(name, "TYPED_TEST_P") == 0; |
| 5497 | } |
| 5498 | |
| 5499 | /* Compose a unique name from a GoogleTest-style macro invocation by appending |
| 5500 | * the macro arguments: TEST(Suite, Case) -> "TEST_Suite_Case". |