| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Add gmock Matcher<std::string_view> specialization.
PiperOrigin-RevId: 294443240
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Disable move operations for TEST() and TEST_F() macros.
Previous implementation disabled only copy ctor and assing operator, but
this was violating rule of 5[1], which was captured by static code analysis tools
like clang-tidy `cppcoreguidelines-special-member-functions`.
[1]: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#c21-if-you-define-or-delete-any-default-operation-define-or-delete-them-all
|
|
|
|
|
|
|
|
| |
Wrap call to std::numeric_limits<>::max into round braces to appease MSVC.
Closes #2589
PiperOrigin-RevId: 282581361
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use standard C++11 integer types in gtest-port.h.
Remove testing::internal::{Int,Uint}{32,64} in favor of types
guaranteed to be in <cstdint> since C++11.
Tests for built-in integer type coverage are switched from
{Int,Uint}64 to [unsigned] long long, which is guaranteed by
C++11 to exist and be at least 64-bit wide.
PiperOrigin-RevId: 281565263
|
|\
| |
| |
| | |
PiperOrigin-RevId: 278008286
|
|\ \
| |/
| |
| | |
PiperOrigin-RevId: 277979766
|
| | |
|
|\ \
| | |
| | |
| | | |
PiperOrigin-RevId: 276333426
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* Added support for ESP8266
* Removed previous Arduino defines in favor
of GTEST_OS_* syntax
* Improved PlatformIO library file to be more
stable when consumed in client applications.
|
| | | | |
|
| |/ /
| | |
| | |
| | |
| | | |
Added various conditional compliations for ESP8266 to stub out
missing functionality.
|
|\ \ \
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 275842505
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Remove bool_constant in favor of std::integral_constant<bool, ...>;
The one non-trivial use of bool_constant has been changed to have significantly
fewer template specializations.
PiperOrigin-RevId: 275842490
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
PiperOrigin-RevId: 275838743
|
| | | | | |
|
| | |_|/
| |/| | |
|
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Mark more functions with "override" keyword, just like
it was done in commit 2460f97152c.
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
|
|\ \ \
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 274100752
|
| |/ / |
|
| |/
|/|
| |
| | |
This helps corrects builds with -Werror=suggest-overrides
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Merge 3bdefdb473d304803d2a38e2a2cd5cdc1827c3bd into fb49e6c164490a227bbb7cf5223b846c836a0305
Closes #2407
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/googletest/pull/2407 from kuzkry:StaticAssertTypeEq 3bdefdb473d304803d2a38e2a2cd5cdc1827c3bd
PiperOrigin-RevId: 269255328
|
|\ \
| |/
|/|
| | |
PiperOrigin-RevId: 268693457
|
| |
| |
| |
| |
| | |
Due to confusion arisen from "iff" standing for "if and only if",
this commit uses the latter.
|
|\ \
| | |
| | |
| | | |
PiperOrigin-RevId: 266136896
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Merge b8ca465e73ac0954a0c9eec2a84bdd8913d5763b into 90a443f9c2437ca8a682a1ac625eba64e1d74a8a
Closes #2396
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/googletest/pull/2396 from kuzkry:custom-type-traits-true/false_type-and-bool_constant b8ca465e73ac0954a0c9eec2a84bdd8913d5763b
PiperOrigin-RevId: 265064856
|
|\ \ \
| |_|/
|/| |
| | | |
PiperOrigin-RevId: 264842713
|
| |/ |
|
|/ |
|
| |
|
|
|
|
|
| |
Fixes a minor ordering issue when defining the platform macro.
Also fixes a minor typo: 'Max OS X' -> 'Mac OS X'.
|
|\
| |
| |
| | |
PiperOrigin-RevId: 243104604
|
|/
|
|
|
| |
This allows googletest to recognize the Haiku operating system when
running tests in other projects.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add HWASan annotations.
These mirror existing ASan annotations.
HWASan uses memory (address) tagging to detect memory errors:
https://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html
It inserts a random tag in the MSB of heap and stack allocation addresses. This tag dominates pointer comparison in StackGrowsDown(), making the result non-deterministic, and entirely unrelated to the actual stack growth direction. The function attribute disables this behavior.
The annotations in gtest-printers are there because the printers are used to basically dump memory. The sanitizers may have ideas why this memory should not be accessed, and that is counter productive. In particular, the test may access only part of an array, but in case of a test failure gtest will dump the entire array which may contain uninitialized bytes - that's what SANITIZE_MEMORY annotation is for. There are similar reasons for ADDRESS and THREAD annotations. HWADDRESS in its current implementation can not cause issues there, I believe, but it falls under the same umbrella of tools whose checking should not apply to test printers because it is not the code under test.
PiperOrigin-RevId: 241379822
|
|
|
|
|
|
|
|
| |
Remove support for "global" ::string and ::wstring types.
This support existed for legacy codebases that existed from before namespaces
where a thing. It is no longer necessary.
PiperOrigin-RevId: 241335738
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Let embedders customize GTEST_INTERNAL_DEPRECATED().
GTEST_INTERNAL_DEPRECATED is currently used to nudge googletest users to migrate off old TEST_CASE macros to the new TEST_SUITE macros. This move is non-trivial for Chromium (see https://crbug.com/925652), and might be difficult for other big projects with many dependencies.
This CL facilitates moving off of deprecated APIs by making it possible for an embedder to define GTEST_INTERNAL_DEPRECATED() in gtest/internal/custom/gtest-port.h. Example usage:
1) #define GTEST_INTERNAL_DEPRECATED() to nothing, to disable deprecation warnings while migrating off googletest's deprecated APIs. This can be preferable to having to disable all deprecation warnings (-Wno-error=deprecated or -Wno-deprecated-declarations).
2) #define GTEST_INTERNAL_DEPRECATED() for an unsupported compiler.
PiperOrigin-RevId: 236171043
|
|
|
|
|
|
|
|
|
|
| |
As noted in the patch description:
* Add DragonFly and GNU/kFreeBSD support.
* Implement GetThreadCount() for BSDs.
1. https://svnweb.freebsd.org/ports/head/devel/googletest/files/patch-bsd-defines?revision=488934
Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
|
|
|
|
|
|
| |
Mark legacy _TEST_CASE_ macros as deprecated
PiperOrigin-RevId: 232303251
|
|
|
|
|
|
| |
TestCase->TestSuite refactoring
PiperOrigin-RevId: 227702164
|
|
|
|
|
|
| |
Internal Change
PiperOrigin-RevId: 227575279
|
|
|
|
|
|
|
|
| |
Remove the #ifs for old, unsupported and buggy compilers:
* old versions of GCC & MSVC
* Symbian
PiperOrigin-RevId: 227116941
|
|
|
|
|
|
| |
Unifdef c++11-related macros from googletest now that it requires C++11.
PiperOrigin-RevId: 225905601
|
|
|
|
|
|
| |
Internal Change
PiperOrigin-RevId: 225231727
|
|\
| |
| |
| | |
PiperOrigin-RevId: 224054240
|
|/ |
|
|
|
|
|
|
| |
Applied fixes for ClangTidy modernize-use-override and modernize-use-using.
PiperOrigin-RevId: 223800219
|
|
|
|
|
|
| |
Internal Change
PiperOrigin-RevId: 222123106
|