A few tests are examining code locations and looking af the resulting line
numbers to verify that GoogleTest shows those to users correctly. Some of those
locations change when clang-format is run. For those locations, I've wrapped
portions in:
// clang-format off
...
// clang-format on
There may be other locations that are currently not tickled by running
clang-format.
PiperOrigin-RevId: 434844712
Change-Id: I3a9f0a6f39eff741c576b6de389bef9b1d11139d
This catches when a client creates an action and discards it, thinking that the action has actually been applied to something.
This will help people who make the mistake of defining, for example, both `void Use(Foo*, Bar)` and `ACTION_P(Use, bar) { Use(arg, bar); }` for later application to a Foo. With such an overload, a client may then write `Use(bar);`, selecting the Action<> overload and being confused why nothing happens.
This also catches when a client defines their own action in terms of an ACTION_P()-generated one, invokes the Action<>'s builder, and then fails to invoke the resulting action, thinking it's operating on the outer action's parameters.
PiperOrigin-RevId: 433197479
Change-Id: I98e4389150d01a5e753230113016d9fc38b1d260
So that global test environments are by default set up and torn down once,
regardless of the value of the repeat flag.
The point of global environments is to be set up and torn down once, and shared
by all tests in the process. There is no obvious reason why multiple runs of the
same test should be treated distinctly from single runs of different tests.
Having this be false by default means that repeats using a global environment
run faster. It can still be set to true if it's desired that every repeat get a
fresh environment, but this seems less important given the nature of a global
environment. Every test I've seen using a global environment uses it to set up
some expensive external resource, not something that can/should be set up for
each test anew. (Again this is unsurprising, since the environment is a global.)
PiperOrigin-RevId: 424003937
Change-Id: I9e8a825cb8900960dd65b85fe5ffcc0a337e57f3
dispatch. It will use the definition from the class the constructor of which
PiperOrigin-RevId: 421291241
Change-Id: If81e3d6d3774edfbbb4baaec8a3cd96566b3b09c
They were all removed in #2815, but it looks like this one got added
from a Google export which missed the update. See #2815 for reasons why
removing this is desirable.
We should perform an explicit type conversion to `unsigned char` before passing the
`const char` data to `IsValidXmlCharacter()` and `IsNormalizableWhitespace()` functions
in order to avoid compile time conversion warnings
Signed-off-by: Ayush Joshi <ayush854032@gmail.com>