| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Merge 7f4f58da20e1066a888d3e4bcbef541db798a605 into 90a443f9c2437ca8a682a1ac625eba64e1d74a8a
Closes #2395
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/googletest/pull/2395 from kuzkry:custom-type-traits-remove_reference 7f4f58da20e1066a888d3e4bcbef541db798a605
PiperOrigin-RevId: 266189044
|
|\
| |
| |
| | |
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
|
| |/ |
|
|\ \
| | |
| | |
| | | |
PiperOrigin-RevId: 264693952
|
| |/ |
|
|\ \
| | |
| | |
| | | |
PiperOrigin-RevId: 264652890
|
| |/ |
|
|\ \
| | |
| | |
| | | |
PiperOrigin-RevId: 263568712
|
| |/ |
|
|\ \
| | |
| | |
| | | |
PiperOrigin-RevId: 263416977
|
| |/ |
|
|/ |
|
|\
| |
| |
| | |
PiperOrigin-RevId: 261906004
|
| |
| |
| |
| |
| |
| |
| | |
This is useful to let a subsystem generate test names based on parameterized tests
without exposing them as such to the user.
Signed-off-by: Knut Omang <knut.omang@oracle.com>
|
| |
| |
| |
| |
| |
| | |
Internal Change
PiperOrigin-RevId: 261683482
|
|\ \
| | |
| | |
| | | |
PiperOrigin-RevId: 261355792
|
| | |
| | |
| | |
| | | |
in addition, fix typo of use -> us
|
| | |
| | |
| | |
| | |
| | |
| | | |
Document the fact that {Setup,TearDown}TestSuite failures are currently being dropped.
PiperOrigin-RevId: 260962695
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
Adds ISO8601 timestamps to XML output and RFC3339 timestamps to JSON output.
Adds timestamps to testsuites, testsuite and testcases structured JSON/XML output for better reporting how/where time is spent on tests.
PiperOrigin-RevId: 260039817
|
| |
| |
| |
| |
| |
| | |
comment change
PiperOrigin-RevId: 251231524
|
|\ \
| |/
|/|
| | |
PiperOrigin-RevId: 248759825
|
|/
|
|
|
| |
Otherwise the code won't compile if the '&' operater is overloaded and
return something that cannot be casted to void *.
|
|
|
|
|
|
|
|
| |
Add GTEST_FAIL_AT, an equivalent to ADD_FAILURE_AT but that
spawns a fatal failure rather than a non-fatal, eg. the equivalent
of an ASSERT* failure rather than an EXPECT* failure.
PiperOrigin-RevId: 244746609
|
|
|
|
|
|
| |
Expose more information in SuiteApiResolver diagnostic output
PiperOrigin-RevId: 244179347
|
|\
| |
| |
| | |
PiperOrigin-RevId: 244069956
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Cast some values as their unsigned equivalents or `size_t` to match the
parameter type used for the template object under test. Also, provide
UInt32 equivalent delegate methods for some callers (with
int-equivalents for backwards compatibility).
This closes #2146.
Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
|
| |
| |
| |
| |
| | |
Fixes a minor ordering issue when defining the platform macro.
Also fixes a minor typo: 'Max OS X' -> 'Mac OS X'.
|
|\ \
| | |
| | |
| | | |
PiperOrigin-RevId: 243121568
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Per the MSVC documentation the warning is new as of Visual Studio 2017,
version 15.8.
https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/c5046?view=vs-2019
GTest users building on MSVC 2015 or older versions of 2017 will, when
C4616 is enabled, see a warning like:
[...]gtest-matchers.h(53): error C2220: warning treated as error - no 'object' file generated
[...]gtest-matchers.h(53): warning C4619: #pragma warning: there is no warning number '5046'
Guard the mention of 5046 by an _MSC_VER check. VS2017 15.8 corresponds
to an _MSC_VER of 1915.
https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-2019
|
|\ \
| |/
|/|
| | |
PiperOrigin-RevId: 243104604
|
|/
|
|
|
| |
This allows googletest to recognize the Haiku operating system when
running tests in other projects.
|
|
|
|
|
| |
Typos: "more then" -> "more than".
PiperOrigin-RevId: 241483698
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Remove mention of unused type ProtocolMessage.
PiperOrigin-RevId: 239242706
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix emission of -Wzero-as-null-pointer-constant when comparing integers.
The following code fails to compile:
#pragma clang diagnostic error "-Wzero-as-null-pointer-constant"
void foo() {
EXPECT_EQ(0, 0);
}
This happens because gtest checks the first argument to EXPECT_EQ and
ASSERT_EQ is a null pointer constant. The magic it does to do this causes the
warning to be emitted.
This patch removes that check. It replaces the explicit check with a Compare
overload that can only be selected when 0 or nullptr is passed on the LHS
with a pointer on the right.
This patch does not suppress -Wzero-as-null-pointer-constant when users
are actually using it as NULL.
PiperOrigin-RevId: 236654634
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Replace more pump'd code with variadic templates.
PiperOrigin-RevId: 235584585
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Internal changes.
PiperOrigin-RevId: 232953166
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix matcher comparisons for std::reference_wrapper.
The googletest docs indicate that std::reference_wrapper should be used to for
objects that should not be copied by the matcher (in fact, the ByRef() function
is basically the same as a call to std::cref).
However, for many types (such as std::string), the overloaded operator== will
not resolve correctly. Specifically, this is problematic if operator== depends
on template argument deduction, where the same type is named on LHS and RHS.
Because template argument deduction happens before any implict conversions for
purposes of overload resolution, attempting to compare T with
std::reference_wrapper<T> simply looks like a comparison of unlike types.
For exapmle, std::reference_wrapper<std::string> is implicitly convertible to
'const std::string&', which would be able to choose an overload specialization
of operator==. However, the implicit conversion can only happen after template
argument deduction for operator==, so a specialization that would other be an
applicable overload is never considered.
Note also that this change only affects matchers. There are good reasons that
matchers may need to transparently hold a std::reference_wrapper. Other
comparisons (like EXPECT_EQ, et. al.) don't need to capture a reference: they
don't need to defer evaluation (as in googlemock), and they don't need to avoid
copies (as the call chain of matchers does).
PiperOrigin-RevId: 232499175
|
|
|
|
|
|
|
|
| |
Address -Wgnu-zero-variadic-macro-arguments
Originally in OSS PR #2063 https://github.com/google/googletest/pull/2063
Fix regression in INSTANTIATE_TEST_SUITE_P macro to accept function pointers properly.
PiperOrigin-RevId: 232316698
|
|
|
|
|
|
| |
Mark legacy _TEST_CASE_ macros as deprecated
PiperOrigin-RevId: 232303251
|
|
|
|
|
|
|
| |
Update example code in gtest.h to prefer override over virtual now
that it is widely available in C++11.
PiperOrigin-RevId: 232057792
|
|\
| |
| |
| | |
PiperOrigin-RevId: 231456275
|
|\ \
| |/
| |
| | |
PiperOrigin-RevId: 231434457
|