summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest
Commit message (Collapse)AuthorAgeFilesLines
* Googletest exportHEADmasterAbseil Team2021-04-291-17/+0
| | | | | | Revert https://github.com/google/googletest/commit/ac3c2a8d0496893787015014a5abd397b766cce2 -- it seems to break some gcc users (#3384) PiperOrigin-RevId: 370834917
* chore: fix spellingJohn Bampton2021-04-153-3/+3
|
* Googletest exportAbseil Team2021-04-132-5/+12
| | | | | | | | | | | 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
* Googletest exportAbseil Team2021-04-051-4/+23
| | | | | | Add macros to omit {EXPECT,ASSERT}_{TRUE,FALSE} PiperOrigin-RevId: 366455905
* Googletest exportAbseil Team2021-03-222-15/+102
| | | | | | | | | | | | | | | | | | | | 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
* Internal changeAbseil Team2021-03-161-4/+4
| | | | PiperOrigin-RevId: 362216935
* Merge pull request #3184 from N-Dekker:PrintTo-type_index-overloadDino Radaković2021-03-091-0/+17
|\ | | | | | | PiperOrigin-RevId: 361175466
| * overload PrintTo for std::type_info and std::type_indexNiels Dekker2021-02-251-0/+23
|/ | | | | | | | | | | | | | | | | | | | | 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.
* Googletest exportAbseil Team2021-02-1822-67/+66
| | | | | | Make include guards conform with https://google.github.io/styleguide/cppguide.html#The__define_Guard, attempt #2 PiperOrigin-RevId: 357056902
* Googletest exportAbseil Team2021-02-1122-66/+67
| | | | | | Revert include guard fix PiperOrigin-RevId: 356588893
* Internal changeAbseil Team2021-02-111-7/+6
| | | | PiperOrigin-RevId: 356572459
* Googletest exportAbseil Team2021-02-111-0/+4
| | | | | | | Fix #2987 Removing const before passing any types through UniversalPrinter. PiperOrigin-RevId: 356508875
* Googletest exportAbseil Team2021-02-1122-67/+66
| | | | | | Make include guards conform with https://google.github.io/styleguide/cppguide.html#The__define_Guard PiperOrigin-RevId: 355882793
* Googletest exportAbseil Team2021-02-051-4/+0
| | | | | | Delete Google-internal IWYU pragmas PiperOrigin-RevId: 355398547
* Googletest exportAbseil Team2021-02-051-1/+2
| | | | | | | | 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
* Googletest exportAbseil Team2021-02-051-0/+1
| | | | | | Document the fact that MatchAndExplain(T, MatchResultListener*) is supported. PiperOrigin-RevId: 354172275
* Googletest exportAbseil Team2021-02-053-16/+0
| | | | | | Remove uses of GTEST_HAS_TYPED_TEST_P and GTEST_HAS_TYPED_TEST. PiperOrigin-RevId: 353935996
* Googletest exportAbseil Team2021-01-261-2/+0
| | | | | | Delete obsolete comment, gtest-param-test.h isn't generated by pump anymore PiperOrigin-RevId: 353680589
* Googletest exportAbseil Team2021-01-263-344/+0
| | | | | | Stop using pump for generating internal/custom/gmock-generated-actions.h PiperOrigin-RevId: 352660735
* Merge pull request #3204 from kuzkry:CmpHelperXX-overloads-removalCJ Johnson2021-01-261-16/+1
|\ | | | | | | PiperOrigin-RevId: 352626267
| * remove explicit function overloads of CmpHelper?? for BiggestInt argumentsKrystian Kuzniarek2021-01-031-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* | Googletest exportkrzysio2021-01-261-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
* | Googletest exportAbseil Team2021-01-263-0/+344
| | | | | | | | | | | | Merge CONTRIBUTORS, delete LICENSEs in googletest/ and googlemock/ PiperOrigin-RevId: 352558822
* | Googletest exportdmauro2021-01-131-1/+1
| | | | | | | | | | | | Fix build under GCC 5 PiperOrigin-RevId: 351607537
* | Googletest exportAbseil Team2021-01-131-0/+39
| | | | | | | | | | | | | | | | Print unique_ptr/shared_ptr recursively. Given that they are smart pointers, it is unlikely that the inner object is invalid. PiperOrigin-RevId: 351586888
* | Googletest exportAbseil Team2021-01-131-1/+5
| | | | | | | | | | | | | | | | | | | | 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
* | Googletest exportAbseil Team2021-01-131-82/+255
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Googletest exportAbseil Team2021-01-131-1/+3
| | | | | | | | | | | | Fix Objective-C++ compatibility PiperOrigin-RevId: 350192165
* | Googletest exportAbseil Team2021-01-131-5/+12
|/ | | | | | Add support for printing incomplete types in the universal printer. PiperOrigin-RevId: 350154637
* Googletest exportAbseil Team2020-12-021-0/+1
| | | | | | | | 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
* Googletest exportAbseil Team2020-11-122-9/+4
| | | | | | | Use a tagged constructor for FlatTuple instead. Some versions of MSVC are getting confused with that constructor and generating invalid code. PiperOrigin-RevId: 342050957
* fix typosHyuk Myeong2020-11-082-6/+6
|
* Merge pull request #2714 from kuzkry:remove-repeated-includeAndy Getz2020-11-021-4/+0
|\ | | | | | | PiperOrigin-RevId: 340266002
| * remove a duplicated includeKrystian Kuzniarek2020-06-121-4/+0
| | | | | | | | | | | | 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.
* | Googletest exportdmauro2020-10-151-1/+1
| | | | | | | | | | | | | | Fixes build warnings from previous CL Add CMake to internal presubmit to prevent these PiperOrigin-RevId: 337325504
* | Googletest exportAbseil Team2020-10-141-3/+9
| | | | | | | | | | Add ::testing::FieldsAre matcher for objects that support get<> and structured bindings. PiperOrigin-RevId: 337165285
* | Googletest exportdmauro2020-10-141-4/+12
| | | | | | | | | | | | Disable -Wmismatched-tags warning for struct/class tuple_size PiperOrigin-RevId: 337087493
* | Googletest exportdmauro2020-10-141-2/+2
| | | | | | | | | | | | Fix -Wmismatched-tags error with struct tuple_size vs class tuple_size PiperOrigin-RevId: 336930166
* | Googletest exportofats2020-10-142-15/+58
| | | | | | | | | | | | Add helper methos to internal FlatTuple. Refactor constructors. PiperOrigin-RevId: 336306681
* | Googletest exportAbseil Team2020-10-141-30/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge pull request #2837 from inazarenko:duck_type_protosDerek Mauro2020-10-142-6/+30
|\ \ | | | | | | | | | PiperOrigin-RevId: 336087297
| * | Detect proto messages based on presense of DebugString.Igor Nazarenko2020-05-051-4/+27
| | |
* | | Googletest exportAbseil Team2020-09-291-1/+2
| | | | | | | | | | | | | | | | | | Update comment to suggest using SetUpTestSuite and TearDownTestSuite. PiperOrigin-RevId: 334430329
* | | Googletest exportAbseil Team2020-09-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge pull request #2972 from srz-zumix:fix/remove_legacy_testcase_api_Derek Mauro2020-08-071-0/+12
|\ \ \ | | | | | | | | | | | | PiperOrigin-RevId: 325220934
| * | | fix testssrz_zumix2020-08-021-0/+12
| | | |
* | | | fix clang tidy modernize-use-equals-default warningsjasjuang2020-07-191-1/+1
|/ / /
* | | Merge pull request #2903 from AmatanHead:informative-exception-assertsvslashg2020-07-151-32/+81
|\ \ \ | | | | | | | | | | | | PiperOrigin-RevId: 320425648
| * | | Make EXPECT_THROW and EXPECT_NO_THROW macros more informativeVladimir Goncharov2020-06-201-5/+38
| | | | | | | | | | | | | | | | | | | | | | | | EXPECT_THROW and EXPECT_NO_THROW will now print exception type and message when an unexpected std::exception-derived error is thrown. Fixes #2878
* | | | Merge pull request #2718 from NINI1988:masterMark Barolak2020-06-262-7/+12
|\ \ \ \ | | | | | | | | | | | | | | | PiperOrigin-RevId: 317696457
OpenPOWER on IntegriCloud