Mark more functions with "override" keyword, just like
it was done in commit 2460f97152.
This should prevent compiler from complaining while compiling both
user code, and the googletest code itself with the -Wsuggest-override
option turned on; with the exception of:
* calls to new MOCK_METHOD() in test/gmock-function-mocker_test.cc
* calls to old MOCK_METHODx()/MOCK_CONST_METHODx() in other
unit test files.
Closes#2493
- Fix a bug in dealing with paramaterized tests where the name is it self a macro expansion.
- Add a compile time check to ensure that the parameters to TEST_P and INSTANTIATE_TEST_SUITE_P are not empty. The above fix causes some compilers to fail in that case and even where it works, it's likely to result in technically invalid code by virtue of creating reserved identifiers:
https://en.cppreference.com/w/cpp/language/identifiers
PiperOrigin-RevId: 274047249
Add a compile time check to ensure that the parameters to TEST_P and INSTANTIATE_TEST_SUITE_P are not empty. Some compilers already fail in that case and, even where it works, it's likely to result in technically invalid code by virtue of creating reserved identifiers:
https://en.cppreference.com/w/cpp/language/identifiers
PiperOrigin-RevId: 273832263
The change makes implicit assumptions on the layout of the install
tree, which is going to break in many ways.
The correct solution is to use the `PKG_CONFIG_SYSROOT_DIR` variable
to inject the cross-compiled sysroot into `-I` and `-L` paths.
Add a compile time check to ensure that the parameters to TEST and TEST_F are not empty
Some compilers may already fail in that case and even where it works, it's likely to result in technically invalid code by virtue of creating reserved identifiers:
https://en.cppreference.com/w/cpp/language/identifiers
PiperOrigin-RevId: 272543242
Use a more portable path for Android to write temp files to.
/sdcard is *not* guaranteed to be available, but /data/local/tmp is.
In some emulated situations, /sdcard may not be mounted, may not be R/W, or
mounting may be delayed until *after* the test process begins.
This is fairly common location to use. See e.g.:
https://reviews.llvm.org/D9569
PiperOrigin-RevId: 270909282
This macro didn't work when an array was passed to a function by pointer,
in which case the information about its size was lost.
Better alternatives are:
* std::extent<T>::value (compile-time)
* std::array<T, N>::size() (compile-time)
* std::distance(std::begin(array), std::end(array)) (run-time)