| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Revert https://github.com/google/googletest/commit/ac3c2a8d0496893787015014a5abd397b766cce2 -- it seems to break some gcc users (#3384)
PiperOrigin-RevId: 370834917
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add support to run gtest on Xtensa platform.
This add support to run GTest base test suits on Xtensa
(https://ip.cadence.com/ipportfolio/tensilica-ip) base simulator.
Xtensa only provides libc and some basic operations and does not run an
operating system by default.
PiperOrigin-RevId: 368162205
|
|
|
|
|
|
| |
Add macros to omit {EXPECT,ASSERT}_{TRUE,FALSE}
PiperOrigin-RevId: 366455905
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Print std::u8string, std::u16string, and std::u32string as string literals
Previously, these types were printed as "{ U+123, U+456, U+789 }". However,
printed output in that form is difficult to compare against any literals that
might be defined in code. Instead, just treat these types like std::string
and std::wstring, escaping non-ASCII characters with a hexadecimal escape
sequence.
The tests have also been updated to cover the new functionality: as a bonus,
the tests now also pass with the MSVC toolchain.
Internally, the code has been reorganized to primarily operate in terms of
char32_t, under the assumption that char32_t will always be at least as big
as wchar_t. While that assumption is currently true, perhaps it won't be in
the future...
PiperOrigin-RevId: 364033132
|
|
|
|
| |
PiperOrigin-RevId: 362216935
|
|\
| |
| |
| | |
PiperOrigin-RevId: 361175466
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Included the string returned by their `name()` member function with the output of `PrintTo`.
Typical use case:
std::unique_ptr<AbstractProduct> product = FactoryMethod();
// Assert that the product is of type X:
ASSERT_EQ(std::type_index{typeid(*product)},
std::type_index{typeid(ProductX)});
Possible output in case of a test assert failure, now including the names of the compared type indices:
> error: Expected equality of these values:
> std::type_index(typeid(*product))
> Which is: 8-byte object <D0-65 54-8C F6-7F 00-00> ("class ProductY")
> std::type_index(typeid(ProductX))
> Which is: 8-byte object <40-64 54-8C F6-7F 00-00> ("class ProductX")
With help from Krystian Kuzniarek.
|
|
|
|
|
|
| |
Make include guards conform with https://google.github.io/styleguide/cppguide.html#The__define_Guard, attempt #2
PiperOrigin-RevId: 357056902
|
|
|
|
|
|
| |
Revert include guard fix
PiperOrigin-RevId: 356588893
|
|
|
|
| |
PiperOrigin-RevId: 356572459
|
|
|
|
|
|
|
| |
Fix #2987
Removing const before passing any types through UniversalPrinter.
PiperOrigin-RevId: 356508875
|
|
|
|
|
|
| |
Make include guards conform with https://google.github.io/styleguide/cppguide.html#The__define_Guard
PiperOrigin-RevId: 355882793
|
|
|
|
|
|
| |
Delete Google-internal IWYU pragmas
PiperOrigin-RevId: 355398547
|
|
|
|
|
|
|
|
| |
Address `-Wpedantic` issue introduced in https://github.com/google/googletest/pull/3204
Raised via https://github.com/google/googletest/commit/4898cdacfec11e71fa3083cdbc935852ad8162e9#commitcomment-46413996
PiperOrigin-RevId: 354198931
|
|
|
|
|
|
| |
Document the fact that MatchAndExplain(T, MatchResultListener*) is supported.
PiperOrigin-RevId: 354172275
|
|
|
|
|
|
| |
Remove uses of GTEST_HAS_TYPED_TEST_P and GTEST_HAS_TYPED_TEST.
PiperOrigin-RevId: 353935996
|
|
|
|
|
|
| |
Delete obsolete comment, gtest-param-test.h isn't generated by pump anymore
PiperOrigin-RevId: 353680589
|
|
|
|
|
|
| |
Stop using pump for generating internal/custom/gmock-generated-actions.h
PiperOrigin-RevId: 352660735
|
|\
| |
| |
| | |
PiperOrigin-RevId: 352626267
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Affects macros {ASSERT|EXPECT}_{EQ|NE|LE|LT|GE|GT}.
According to removed comments, these overloads were supposed to reduce
code bloat and allow anonymous enums on GCC 4.
However, the way it works on GCC 4 and the latest GCC (10.2 by now) is
that having:
template <typename T1, typename T2>
void foo(T1, T2);
using BiggestInt = long long;
void foo(BiggestInt, BiggestInt);
the template version takes precedence for almost every combination of
integral types except for two long long integers - i.e. implicit
promotion to long long is a worse match than generating a specific
template function.
Tested on GCC 4.8.1 (as GoogleTest requires C++11 and this was
the first C++11 feature-complete release of GCC),
GCC 4.8.5 (last of 4.8.x series) and the latest GCC (10.2.0).
|
| |
| |
| |
| |
| |
| |
| |
| | |
Remove obsolete argument limit documentation.
Combine uses variadic templates now, so there is no inherent limit on the number of arguments.
PiperOrigin-RevId: 352580160
|
| |
| |
| |
| |
| |
| | |
Merge CONTRIBUTORS, delete LICENSEs in googletest/ and googlemock/
PiperOrigin-RevId: 352558822
|
| |
| |
| |
| |
| |
| | |
Fix build under GCC 5
PiperOrigin-RevId: 351607537
|
| |
| |
| |
| |
| |
| |
| |
| | |
Print unique_ptr/shared_ptr recursively.
Given that they are smart pointers, it is unlikely that the inner object is
invalid.
PiperOrigin-RevId: 351586888
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Launder buffer before reference
In GCC, directly casting the Buffer reference to another type results in
strict-aliasing violation errors. This launders the reference using an
intermediate pointer prior to creating the new reference.
PiperOrigin-RevId: 350809323
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change Matcher<T> to allow binding an implementation by value directly:
- Drop the requirement of MatcherInterface. Doing manual type erasure avoid
extra layers in many cases.
- Avoid the adaptor for `MatcherInterface<T>` and `MatcherInterface<const T&>` mismatch.
- Use a small object optimization when possible. This makes things like
`_` and `Eq(1)` really cheap and do not require memory allocations.
- Migrate some matchers to the new model to speed them up and to test the new framework. More matchers to come in future changes.
PiperOrigin-RevId: 350580998
|
| |
| |
| |
| |
| |
| | |
Fix Objective-C++ compatibility
PiperOrigin-RevId: 350192165
|
|/
|
|
|
|
| |
Add support for printing incomplete types in the universal printer.
PiperOrigin-RevId: 350154637
|
|
|
|
|
|
|
|
| |
Include TargetConditionals.h before checking TARGET_OS_IPHONE
New versions of Clang require that you include TargetConditionals.h before checking the TARGET_OS_* macros. Include it where appropriate to keep the compiler happy.
PiperOrigin-RevId: 345106443
|
|
|
|
|
|
|
| |
Use a tagged constructor for FlatTuple instead.
Some versions of MSVC are getting confused with that constructor and generating invalid code.
PiperOrigin-RevId: 342050957
|
| |
|
|\
| |
| |
| | |
PiperOrigin-RevId: 340266002
|
| |
| |
| |
| |
| |
| | |
Detection of string_view type (whether it's std or Abseil)
is done in googletest/include/gtest/internal/gtest-port.h
with GTEST_INTERNAL_HAS_STRING_VIEW.
|
| |
| |
| |
| |
| |
| |
| | |
Fixes build warnings from previous CL
Add CMake to internal presubmit to prevent these
PiperOrigin-RevId: 337325504
|
| |
| |
| |
| |
| | |
Add ::testing::FieldsAre matcher for objects that support get<> and structured bindings.
PiperOrigin-RevId: 337165285
|
| |
| |
| |
| |
| |
| | |
Disable -Wmismatched-tags warning for struct/class tuple_size
PiperOrigin-RevId: 337087493
|
| |
| |
| |
| |
| |
| | |
Fix -Wmismatched-tags error with struct tuple_size vs class tuple_size
PiperOrigin-RevId: 336930166
|
| |
| |
| |
| |
| |
| | |
Add helper methos to internal FlatTuple. Refactor constructors.
PiperOrigin-RevId: 336306681
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Improve lookup of operator<< for user types
Without this fix, trying to use this class with googletest
struct Foo {};
template <typename OutputStream>
OutputStream& operator<<(OutputStream& os, const Foo&) {
os << "TemplatedStreamableInFoo";
return os;
}
results in an ambiguity error between the class' operator<< and the
operator<< in gtest-printers.h removed in this CL.
This fix also enables implicit conversions to happen, so that e.g.
we will find the base class operator<< if a subclass has no
operator<< of its own.
PiperOrigin-RevId: 336261221
|
|\ \
| | |
| | |
| | | |
PiperOrigin-RevId: 336087297
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Update comment to suggest using SetUpTestSuite and TearDownTestSuite.
PiperOrigin-RevId: 334430329
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add millisecond precision to start timestamp in XML/JSON output
- Previous timestamp had format YYYY-MM-DDThh:mm:ss, now YYYY-MM-DDThh:mm:ss.sss
- This conforms to the ISO 8601 standard
PiperOrigin-RevId: 329503623
|
|\ \ \
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 325220934
|
| | | | |
|
|/ / / |
|
|\ \ \
| | | |
| | | |
| | | | |
PiperOrigin-RevId: 320425648
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
EXPECT_THROW and EXPECT_NO_THROW will now print exception type and message when an unexpected std::exception-derived error is thrown.
Fixes #2878
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
PiperOrigin-RevId: 317696457
|