--Thanks,Dom
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAP-uykB0woMo0bqnD2Y0Eo8Ck-LitgaMhMFMZr%3DpHsq31WxZEQ%40mail.gmail.com.
--
I'd like to avoid diverging from Google style on this, but I'd like even more not to say anything in the styleguide about something so trivial. So, my preference is "name new files _test.cc, don't rename existing files, don't write anything in the styleguide, don't stress about violations".
PK--On Fri, Jul 2, 2021 at 12:16 PM Dominic Farolino <d...@chromium.org> wrote:--In Chromium we often use the `_unittest.cc` suffix to distinguish unit tests from browser tests (typically in `_browsertest.cc` files).However, the Google C++ style guide mentions that the `_unittest.cc` suffix for unit tests is deprecated, and the more-general `_test.cc` suffix should be used instead. Using `_test.cc` in Chromium can still distinguish unit tests from browser tests, although it is a lot less explicit in general, so I'm wondering what the Chromium-specific guidance here should be? I don't have a strong opinion, but most people I've talked to seems to still prefer using `_unittest.cc` to distinguish unit tests from browser tests, which makes sense to me. Regardless, I'd like to know:
- What others think about this
- If we decide to keep using `_unittest.cc`, is it worth adding something to the Chromium C++ style guide to clarify our divergence from the Google C++ style guide? I think so
Separately, there are many more instances of `_test.cc` in Blink than there are `_unittest.cc`, but this is suspected to be a holdover from the WebKit days. We have a separate style guide specifically for Blink, but I'd prefer having Blink and Chromium in general be aligned on whatever stance we take here. I suspect we'll resolve to using `_unittest.cc` suffixes, in which case it would make sense to leave the Blink style guide alone and I suppose rename all of the `_test.cc` files in Blink to use the `_unittest.cc` suffix. Do people have any thoughts on this?Thanks,Dom
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAP-uykB0woMo0bqnD2Y0Eo8Ck-LitgaMhMFMZr%3DpHsq31WxZEQ%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAAHOzFAXcC%2Bq_YKji2sx5rOM6yjDv%2BTSTZ8Rs9%2BZ9GiyvHFFrw%40mail.gmail.com.
On Fri, Jul 2, 2021 at 3:26 PM 'Peter Kasting' via cxx <c...@chromium.org> wrote:I'd like to avoid diverging from Google style on this, but I'd like even more not to say anything in the styleguide about something so trivial. So, my preference is "name new files _test.cc, don't rename existing files, don't write anything in the styleguide, don't stress about violations".The style guide does not mention browsertests but it does mention `_regtest`, and my reading of it would say that we should not use our browsertest suffix either then. Since we presumably want to keep that prefix and distinction (I think this is a key property of our testing systems and strategies), I think we should keep both. From there, stating this defacto rule somewhere in the guide does seem worthwhile to me, as it currently is left up to institutional knowledge, and noticing and copying existing code.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAP-uykCxQL8%3DcVcmf9aDSUJJEDN_%2BEzCNfqhohycjCs2riqbxQ%40mail.gmail.com.
This should be pretty easy to enforce with a presubmit check, right?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CACwGi-6PNSk%2BinOuSa2YMmawkgRPHuJwh0YhmT6kPdwvM7kxyg%40mail.gmail.com.
Use of _unittest or _browsertest instead of just _test.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAAHOzFD8FQC5MVD9_Cm3OF_Vpcg7e4d8eQ5CfR%3DZLVAMj%2B866w%40mail.gmail.com.
I don't know, how does google3 deal with multiple kinds of tests?
--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAAHOzFCs%2BzMY-V%2B_7tHSf89kTJEEay7XPR4o%2BbvE9ZnzqSuu2Q%40mail.gmail.com.
I don’t have a strong opinion about naming files, but I think we already have a pretty serious problem with finding a way to run a specific test.If we imagine that I modified some random file with a _test.cc suffix and now I want to compile and run it, it could be in unit_tests, browser_tests, components_unittests, chromeos_unittests, lacros_chrome_browsertests and probably several other binaries.
Could we introduce a way to figure this out?
--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAAHOzFAcywqNkdWPLGOcE8sTgeBcR%3DPsP91kWGdaJDOOC%2BOLFQ%40mail.gmail.com.
Michael Ershov
Software Engineer
Google Germany GmbH
Erika-Mann-Straße 33
80636 München
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Diese E-Mail ist vertraulich. Falls Sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.
This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CACs097CBZM2szwHk_aJKK2MmNVsQPe_7qDiAJMdrmTYrGC3DCw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAGRskv_1z7x1qX0WQckaVTvmx7nr7yM7q%3DZ0auxFoq_KJaVBaw%40mail.gmail.com.
I think my bias would be "be consistent with existing code in the area". Blink tends to use _test.cc for historical reasons; content tends to use _browsertest.cc and _unittest.cc for good local reasons.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAHtyhaQK8aAzFnP8rtUJ87DBxh0g1g8Lk2hfYeG9sKn%2B3fQRcg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CACuR13eEp2NCyzynTnxzZ3p88yFZCRRy1pOo2_19tJ2a0%2BZ4-A%40mail.gmail.com.
How I read this thread so far:
- Clear consensus to keep naming files the way we're currently doing (_unittest, _browsertest, etc.)
- Positive sentiment for modifying the Chromium style guide to say to do that, since it contradicts the Google style guide. Less clear to me that this is at "consensus" stage (or maybe I'm being overcautious?)
Are there any other opinions, especially on the second bullet?PK
--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAAHOzFA%3DK3i-bq2-OEewQRkiYMP%3D9PKaSkjoLbJPEt123v3tJQ%40mail.gmail.com.