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). */
| 3510 | * Multiple such macros in one file all share the extracted name (e.g. "TEST"), |
| 3511 | * causing qualified-name collisions and node loss (#1266). */ |
| 3512 | static bool is_cpp_test_macro(const char *name) { |
| 3513 | return strcmp(name, "TEST") == 0 || strcmp(name, "TEST_F") == 0 || |
| 3514 | strcmp(name, "TEST_P") == 0 || strcmp(name, "TYPED_TEST") == 0 || |
| 3515 | strcmp(name, "TYPED_TEST_P") == 0; |
| 3516 | } |
| 3517 | |
| 3518 | /* Compose a unique name from a GoogleTest-style macro invocation by appending |
| 3519 | * the macro arguments: TEST(Suite, Case) -> "TEST_Suite_Case". |