-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Underscores shouldn't be used in googletest test names #2637
Comments
@yuslepukhin Please take a look |
If I understand the FAQ correctly you can use a single underscore as long as it's not the first character in the test name and followed by an upper case character. I don't believe we have any invalid usage of a single underscore based on that. The usage of a double underscore should be easily fixed. |
It's more restrictive. Single underscores:
And it's tricky to use since I opened the issue to raise awareness of this (on our porting of WinML we're following their recommendation). Fixing the use of double underscores and keeping the safe usages of single underscores sounds fine to me, just be aware of the possible duplicate class name issue :) |
Describe the bug
Use of underscores in test case names (e.g.
TEST(DateTimeTransformer, Past_1976_Nov_17__12_27_04)
) in googletest is not recommended, since it has a few gotchas (https://github.com/google/googletest/blob/master/googletest/docs/faq.md#why-should-test-suite-names-and-test-names-not-contain-underscore). Furthermore, some tests (such asTEST(DateTimeTransformer, Past_1976_Nov_17__12_27_04)
) have double underscores, which are reserved to be used by the compiler and standard library. It's not a big issue and unlikely to break, but it's not standards conforming and, quoting googletest's docs:Urgency
N/A
System information
N/A
To Reproduce
Files such as onnxruntime\test\automl_ops\datetimetransformer_test.cc have a bunch of underscores in test names.
The text was updated successfully, but these errors were encountered: