Commit Graph

317 Commits

Author SHA1 Message Date
Krystian Kuzniarek
f658561ef2 fix a typo 2019-11-02 01:18:21 +01:00
vslashg
057ee5063d Merge pull request #2533 from thejcannon:noexcept_spec
PiperOrigin-RevId: 277924721
2019-11-01 16:02:05 -04:00
Abseil Team
2db3df9c4f Googletest export
Change variable name to match comment.

PiperOrigin-RevId: 277713621
2019-10-31 15:11:41 -04:00
Abseil Team
e2fc3a9c9c Googletest export
Tolerate std::string's explicit copy construction from std::string_view.

PiperOrigin-RevId: 277583394
2019-10-31 15:11:31 -04:00
Abseil Team
755f853c6b Googletest export
Avoid temporary matcher instances.
They are unnecessary and can be relatively more expensive than the rest of the
algorithm.

PiperOrigin-RevId: 277084853
2019-10-29 16:51:31 -04:00
vslashg
b5fb5ba05c Merge pull request #2527 from PiotrNycz:gmock_prevent_return_ref_to_store_temporaries_2
PiperOrigin-RevId: 277061341
2019-10-29 16:51:12 -04:00
Abseil Team
37f3227831 Googletest export
Add a matcher `testing::ReturnRoundRobin` which, on each call, returns the next element in the sequence, restarting at the beginning once it has reached the end.

PiperOrigin-RevId: 276312136
2019-10-23 15:54:45 -04:00
Joshua Cannon
676d0444bf Revert "Merge pull request #2498 from thejcannon:noexcept_spec"
This reverts commit ba513d2c95, reversing
changes made to a3ca5b9e0b.
2019-10-23 14:46:46 -05:00
vslashg
8bab7883a6 Merge pull request #2514 from thejcannon:msvc_macro_issue
PiperOrigin-RevId: 276134684
2019-10-23 13:35:26 -04:00
Piotr Nycz
b11fb80e9e Prevent using ReturnRef on reference to temporary
Fixed issue: 2471
2019-10-22 15:58:00 +02:00
Abseil Team
611a321a6e Googletest export
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
2019-10-22 09:38:12 -04:00
Abseil Team
011c4e23d5 Googletest export
Rolling forward IsNan() matcher with fixes in test for -Wconversion issues. Use
std::nanf and std::nanl where appropriate.
PiperOrigin-RevId: 275523003
2019-10-22 09:37:46 -04:00
misterg
f966ed1581 Googletest export
Added IsNan matcher

PiperOrigin-RevId: 275473218
2019-10-18 11:34:08 -04:00
Abseil Team
1f9edcd969 Googletest export
Addressing https://github.com/google/googletest/issues/2502

Add MOCK_METHOD support for returning function pointers.

PiperOrigin-RevId: 275323671
2019-10-18 11:33:59 -04:00
Abseil Team
bbe4b7363b Googletest export
Added IsNan matcher

PiperOrigin-RevId: 275278634
2019-10-17 13:08:00 -04:00
Joshua Cannon
e1b67b07f7 Avoid recursive macros 2019-10-11 17:13:24 -05:00
Robert Luberda
3cddd56e19 Add more override keywords
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
2019-10-11 23:45:31 +02:00
Joshua Cannon
3e813465a4 Removing extraneous parenthesis 2019-10-11 12:37:59 -05:00
Joshua Cannon
f8961b99f4 Evaluate and cat NARG in different macros 2019-10-11 12:13:15 -05:00
Joshua Cannon
d935e8e3ed Fix preprocessor tests 2019-10-11 10:41:47 -05:00
Joshua Cannon
c081ceebfb Workaround MSVC VA_ARGS weirdness 2019-10-11 09:28:25 -05:00
Gennadiy Civil
ba513d2c95 Merge pull request #2498 from thejcannon:noexcept_spec
PiperOrigin-RevId: 274155281
2019-10-11 08:48:11 -04:00
Gennadiy Civil
37905b9d8c Merge pull request #2498 from thejcannon:noexcept_spec
PiperOrigin-RevId: 274097989
2019-10-11 07:07:12 -04:00
Abseil Team
ed78e54f38 Googletest export
Fix the O(n^2) number of instantiations in ElemFromList.
It is now O(n). It still has O(1) instantiation depth.

PiperOrigin-RevId: 273980821
2019-10-11 07:06:56 -04:00
Gennadiy Civil
cb1d5db1a1 Merge pull request #2448 from kuzkry:bad-googletest-export
PiperOrigin-RevId: 273585026
2019-10-10 09:21:38 -04:00
Joshua Cannon
0eadff8a93 Fix spacing 2019-10-07 14:37:39 -05:00
Joshua Cannon
10c1d8c4fa Use the verbatim noexcept spec in MOCKED_METHOD 2019-10-07 14:30:10 -05:00
Abseil Team
cb3f7ce1de Googletest export
Makes testing::ResultOf() work with non-copyable arguments.

PiperOrigin-RevId: 271222632
2019-09-27 16:48:33 -04:00
Krystian Kuzniarek
7c2bd3af98 square away the stuff that hasn't been merged in a manual review
This fixes up ab8f346b (a manual merge) that has abandoned some things
from PR #2395.
2019-09-16 19:21:37 +02:00
kuzkry
f2fb48c3b3 Googletest export
Merge 3bdefdb473d304803d2a38e2a2cd5cdc1827c3bd into fb49e6c164

Closes #2407

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/googletest/pull/2407 from kuzkry:StaticAssertTypeEq 3bdefdb473d304803d2a38e2a2cd5cdc1827c3bd
PiperOrigin-RevId: 269255328
2019-09-16 11:47:35 -04:00
Shaindel Schwartz
c7a03daa99 Merge pull request #2387 from kuzkry:iff
PiperOrigin-RevId: 268693457
2019-09-12 12:10:51 -04:00
Hosein Ghahremanzadeh
ac24edd6e0 Googletest export
Merge 4c9ef099b29d2c840c04643cd9662fd7be712f7b into 565f1b8482

Closes #2403

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/googletest/pull/2403 from IYP-Programer-Yeah:remove-compile-assert-type-equal 4c9ef099b29d2c840c04643cd9662fd7be712f7b
PiperOrigin-RevId: 268681883
2019-09-12 12:10:41 -04:00
kuzkry
ab8f346b07 Googletest export
Merge 7f4f58da20e1066a888d3e4bcbef541db798a605 into 90a443f9c2

Closes #2395

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/googletest/pull/2395 from kuzkry:custom-type-traits-remove_reference 7f4f58da20e1066a888d3e4bcbef541db798a605
PiperOrigin-RevId: 266189044
2019-09-06 08:00:03 -04:00
Gennadiy Civil
d9c55a48ed Merge pull request #2426 from kuzkry:#2396-postreview
PiperOrigin-RevId: 265785837
2019-08-27 21:30:42 -04:00
Gennadiy Civil
fdd6a1dc8c Merge pull request #2382 from kuzkry:dead-metafunction
PiperOrigin-RevId: 265730482
2019-08-27 16:59:59 -04:00
misterg
6a3d632f40 Googletest export
Add tuple version of Optional() matches. This allows Optional() to be used in Pointwise matchers.

PiperOrigin-RevId: 265501882
2019-08-26 14:43:56 -04:00
Krystian Kuzniarek
38ce18e8e6 post-review to db1b7399 (#2396) 2019-08-24 12:08:13 +02:00
Abseil Team
ed2eef6543 Googletest export
Add tuple version of Optional() matches. This allows Optional() to be used in Pointwise matchers.

PiperOrigin-RevId: 265110864
2019-08-23 16:39:21 -04:00
kuzkry
db1b739943 Googletest export
Merge b8ca465e73ac0954a0c9eec2a84bdd8913d5763b into 90a443f9c2

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
2019-08-23 16:39:13 -04:00
Xiaoyi Zhang
46525e1e5d Merge pull request #2394 from kuzkry:custom-type-traits-duplication-of-custom-index_sequence
PiperOrigin-RevId: 264863984
2019-08-23 16:39:04 -04:00
Xiaoyi Zhang
fb49e6c164 Merge pull request #2393 from kuzkry:custom-type-traits-remove_const
PiperOrigin-RevId: 264652890
2019-08-21 17:13:34 -04:00
Krystian Kuzniarek
7bd4a7f3e9 restore mistakenly removed iffs in their explicit form
Due to confusion arisen from "iff" standing for "if and only if",
this commit uses the latter.
2019-08-20 12:14:22 +02:00
Gennadiy Civil
d5e9e0c38f Merge pull request #2397 from kuzkry:custom-type-traits-is_reference
PiperOrigin-RevId: 264193098
2019-08-19 14:20:11 -04:00
Krystian Kuzniarek
44de869783 remove a dead metafunction 2019-08-16 07:04:49 +02:00
Abseil Team
d44b137fd1 Googletest export
Remove legacy support for signed wchar_t and unsigned wchar_t.

Clang now errors out on these types as well by default. Rather than making the
condition for these types even more complicated, just remove the tests covering
these types since they don't seem to justify the maintenance burden. We
can reasonably expect these types to work in compilers that support them
without needing specific tests for them since they are treated as standard
integral types.

PiperOrigin-RevId: 263577673
2019-08-15 17:34:34 -04:00
Krystian Kuzniarek
6a015ca1cb reuse IndexSequence from googletest 2019-08-14 14:21:32 +02:00
Krystian Kuzniarek
ec49fbca4c remove custom implementations of std::is_same 2019-08-14 14:00:44 +02:00
Krystian Kuzniarek
da76d01b98 remove a custom implementation of std::is_reference 2019-08-14 13:33:13 +02:00
Krystian Kuzniarek
364839ab14 remove a custom implementation of std::remove_const 2019-08-14 00:34:04 +02:00
CJ Johnson
07ec69a886 Merge pull request #2359 from kuzkry:superfluous-mutable
PiperOrigin-RevId: 261947085
2019-08-06 15:02:42 -04:00
Gennadiy Civil
cc34e8fa7c Merge pull request #2357 from kuzkry:obsolete-documentation
PiperOrigin-RevId: 261343928
2019-08-02 13:26:55 -04:00
Abseil Team
da28d30191 Googletest export
Fix ON_CALL/EXPECT_CALL example comment

PiperOrigin-RevId: 261150884
2019-08-01 16:05:57 -04:00
Krystian Kuzniarek
637b0411fa remove an excessive mutable type specifier
MockFunction's private member cannot be reached from outside and all its
non-static member functions are not const.
2019-08-01 11:33:36 +02:00
Krystian Kuzniarek
287b37f23f update pre-C++11 paragraphs 2019-07-31 08:17:32 +02:00
Krystian Kuzniarek
bf6df7eaee fix typos 2019-07-30 12:52:27 +02:00
Abseil Team
373ed74af5 Googletest export
Add copyright.

PiperOrigin-RevId: 259997211
2019-07-25 20:53:34 -04:00
Adam Badura
1f809607b5 Add missing <functional> include
gmock-spec-builders.h uses std::function (in MockFunction) but did
not include <functional> to provide it. Apparently, it worked since
the header must have been included by something else but better be
safe than sorry.
2019-07-16 23:15:51 +02:00
misterg
3d9cdd5803 Googletest export
Fix documentation links

PiperOrigin-RevId: 258389329
2019-07-16 13:35:16 -04:00
Abseil Team
e4f097b5fb Googletest export
Update a broken link in a comment.

PiperOrigin-RevId: 257493975
2019-07-16 11:21:11 -04:00
Gennadiy Civil
5ed950c9e3 Renaming doc files to make the file names more palatable and in preparation for including documentation in sync process 2019-06-19 16:48:38 -04:00
Peter Levine
711fccf831 Don't allow signed/unsigned wchar_t in gcc 9 and later 2019-06-04 01:07:18 -04:00
Abseil Team
3f5b5b8f84 Googletest export
Remove special case for protocol buffers. It is no longer needed.

PiperOrigin-RevId: 246550795
2019-05-03 15:11:37 -04:00
David Benjamin
8e9297b503 MSVC C5046 warning is unavailable in MSVC 2015.
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
2019-04-09 18:13:32 -05:00
Abseil Team
d982543131 Googletest export
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
2019-04-01 15:05:10 -04:00
Abseil Team
f1883b1824 Googletest export
Remove mention of unused type ProtocolMessage.

PiperOrigin-RevId: 239242706
2019-03-21 10:43:06 -04:00
Abseil Team
a4b63e7efb Googletest export
Action helpers need to pass by const& so that they can work with unique_ptr.

PiperOrigin-RevId: 239062671
2019-03-21 10:42:58 -04:00
Abseil Team
56ef07a203 Googletest export
Build gmock cleanly with clang -Wextra-semi

For https://crbug.com/926235.
From https://github.com/google/googletest/pull/2139.
Fixes https://github.com/google/googletest/issues/2138.

PiperOrigin-RevId: 235832527
2019-03-01 16:18:17 -05:00
Gennadiy Civil
bf07131c1d Merge pull request #2041 from ciband:chore/fix_library_json
PiperOrigin-RevId: 230554814
2019-01-23 13:27:16 -05:00
Abseil Team
fdc59ffd05 Googletest export
Add AllOfArray matcher that verifies a value matches all member of some array/container/list/set/..., e.g:
EXPECT_THAT(1, AnyOfArray({1, 2, 3}))
In the simplest form this is identical to AnyOf(1, 2, 3). But unlike that one it works on containers.

Add AnyOfArray matcher that verifies a value matches any member of some
array/container/list/set/...

PiperOrigin-RevId: 230403653
2019-01-23 13:27:08 -05:00
Abseil Team
569fba4d74 Googletest export
Make internal FunctionMocker class final

PiperOrigin-RevId: 230332778
2019-01-22 13:12:13 -05:00
Abseil Team
9518a57428 Googletest export
Fix mocking method arguments with templated copy constructors.

A previous change removed workarounds for old compilers from googletest and googlemock. Unfortunately, a bit of code that started as a workaround for Symbian's C++ compiler is still needed to avoid copy/move constructor ambiguity when mocking functions with certain argument types.

The test case added by this CL is extracted from Chrome's codebase, and was discovered while attempting to roll googletest.

PiperOrigin-RevId: 229801765
2019-01-18 14:06:03 -05:00
Abseil Team
0adeadd283 Googletest export
Refactor the `Invoke` and `InvokeWithoutArgs` actions:
 - Replace pump'd classes and functions with templates.
 - Make the polymorphic actions be polymorphic functors instead.
 - Fix Invoke(Callback*) to work with subclasses of the callbacks, instead of trying to diagnose that in gmock_doctor.

PiperOrigin-RevId: 229604112
2019-01-17 14:41:08 -05:00
Abseil Team
9acd065a90 Googletest export
Add move-only argument support to almost all remaining matchers.

PiperOrigin-RevId: 229030728
2019-01-14 17:02:03 -05:00
Abseil Team
097407fd3c Googletest export
Deduplicate testing::ReferenceWrapper with std::reference_wrapper.
Minor cleanups in matchers_test.

PiperOrigin-RevId: 229022872
2019-01-14 17:01:56 -05:00
misterg
f31bf1d362 Googletest export
Replace testing::internal::ImplicitlyConvertible with std::is_convertible
Fixes #2054

PiperOrigin-RevId: 228334305
2019-01-08 11:51:05 -05:00
Abseil Team
216c37f057 Googletest export
Drop generated file gmock-generated-internal-utils.h.

PiperOrigin-RevId: 228232195
2019-01-08 11:50:56 -05:00
Chris Johnson
0ffa5f9779
Merge branch 'master' into chore/fix_library_json 2019-01-03 21:13:20 -06:00
Chris
4d62b5b9ae fix: Remove Arduino entry points
Improved flexibility by removing the Arduino entry points in favor of manual calls to setup/loop that the user can call from their entry point.  This is the more common use case for Arudino.

Also added the gtest/gmock_main files to the PlatformIO ignore list since we are not supporting that feature.
2019-01-03 12:12:19 -06:00
misterg
14c2fba734 Googletest export
Internal Change

PiperOrigin-RevId: 227575279
2019-01-02 16:51:40 -05:00
Abseil Team
f8b1c1af17 Googletest export
Remove the #ifs for old, unsupported and buggy compilers:
* old versions of GCC & MSVC
* Symbian

PiperOrigin-RevId: 227116941
2019-01-02 16:51:33 -05:00
Abseil Team
34a99e547a Googletest export
Get rid of code generation for NiceMock / StrictMock.
They got small enough that it doesn't make sense to generate them.

PiperOrigin-RevId: 226455689
2018-12-21 11:30:20 -05:00
Abseil Team
9494c45e75 Googletest export
Use std::function to implement type erasure in Action, wrapping the legacy
ActionInterface if necessary.

This makes functors / std::function the primary way to implement Action; the
existing ActionInterface implementations are handled through ActionAdaptor.
The existing actions are not (yet) migrated though; they'll pay the cost of one
additional indirection - but that should be negligible.

PiperOrigin-RevId: 226126137
2018-12-20 14:09:39 -05:00
Abseil Team
e26a3fa13c Googletest export
Unifdef c++11-related macros from googletest now that it requires C++11.

PiperOrigin-RevId: 225905601
2018-12-20 14:09:31 -05:00
Abseil Team
b7dd66519f Googletest export
Remove GTEST_REFERENCE_TO_CONST_ usage from GMock. In C++11, it's redundant.

PiperOrigin-RevId: 225719210
2018-12-17 13:53:39 -05:00
Abseil Team
1ec20f87e3 Googletest export
Allow container matchers to accept move-only containers.

PiperOrigin-RevId: 225667441
2018-12-17 13:53:33 -05:00
Abseil Team
096fb37a19 Googletest export
Replace pump'd code for DoAll with variadic templates.

PiperOrigin-RevId: 225584656
2018-12-17 13:53:26 -05:00
misterg
81f0026066 Googletest export
Internal Change

PiperOrigin-RevId: 225231727
2018-12-13 16:00:11 -05:00
Abseil Team
6ef5913813 Googletest export
The gmock matchers have a concept of MatchAndExpain; where the details of the
matching are written to a "result listener". A matcher can avoid creating
expensive debug info by checking result_listener->IsInterested(); but,
unfortunately, the default matcher code (called from EXPECT_THAT) is always
"interested".

This change implements EXPECT_THAT matching to first run the matcher in a "not
interested" mode; and then run it a second time ("interested") only if the
match fails.

PiperOrigin-RevId: 225036073
2018-12-12 11:54:22 -05:00
misterg
6cbd3753dc Googletest export
rollback of 224929783

PiperOrigin-RevId: 225008559
2018-12-11 11:36:30 -05:00
Abseil Team
06bb8d4d6d Googletest export
The gmock matchers have a concept of MatchAndExpain; where the details of the
matching are written to a "result listener". A matcher can avoid creating
expensive debug info by checking result_listener->IsInterested(); but,
unfortunately, the default matcher code (called from EXPECT_THAT) is always
"interested".

This change implements EXPECT_THAT matching to first run the matcher in a "not
interested" mode; and then run it a second time ("interested") only if the
match fails.

PiperOrigin-RevId: 224929783
2018-12-11 10:11:01 -05:00
Abseil Team
3d71ab4c37 Googletest export
Deduce SizeType for SizeIs() from the return value of the size() member function

PiperOrigin-RevId: 223835674
2018-12-04 09:45:03 -05:00
Abseil Team
26743363be Googletest export
Applied fixes for ClangTidy modernize-use-override and modernize-use-using.

PiperOrigin-RevId: 223800219
2018-12-03 12:54:11 -05:00
Abseil Team
a42cdf2abd Googletest export
Replace pump'd Args() matcher with variadic templates.

PiperOrigin-RevId: 223794430
2018-12-03 12:54:02 -05:00
durandal
b22d23667b Googletest export
Accept gmock matchers in EXPECT_EXIT and friends to allow matches other than simple regex matches on death output.

PiperOrigin-RevId: 223035409
2018-11-28 23:10:17 -05:00
misterg
bb7c0ecbdf Googletest export
Silence C4100 msvc warning

PiperOrigin-RevId: 222242329
2018-11-20 13:30:06 -05:00
misterg
b492666068 Googletest export
Internal Change

PiperOrigin-RevId: 222123106
2018-11-20 13:29:55 -05:00
Abseil Team
5dab7be70d Googletest export
Validate spec modifiers.

PiperOrigin-RevId: 221810235
2018-11-20 13:29:40 -05:00
durandal
8e86f67261 Googletest export
Move the Matcher<T> interface to googletest so I can use it to extend death test regex matching in a subsequent change.

PiperOrigin-RevId: 221675910
2018-11-20 13:29:20 -05:00
Abseil Team
aac18185eb Googletest export
Upgrade WithArgs family of actions to C++11.

PiperOrigin-RevId: 221671690
2018-11-20 13:29:12 -05:00
Abseil Team
e46e87bb1f Googletest export
Unify implementation of GMOCK_PP_REPEAT and GMOCK_PP_FOREACH.

PiperOrigin-RevId: 221659669
2018-11-20 13:29:02 -05:00
Abseil Team
c5f08bf919 Googletest export
One macro to rule them all.

PiperOrigin-RevId: 221462515
2018-11-15 16:11:19 -05:00
Gennadiy Civil
7a0680dc22 Merge pull request #1959 from robinlinden:remove-msvc-workarounds
PiperOrigin-RevId: 221356626
2018-11-13 21:10:42 -05:00
Abseil Team
b18d39bd2e Googletest export
Include type_traits header

ElementsAre, UnorderedElementsAre, AllOf, and AnyOf are all defined in terms of std::decay, which is in the type_traits header.

PiperOrigin-RevId: 220818637
2018-11-13 09:20:47 -05:00
Robin Lindén
826656b25f
Remove workarounds for unsupported MSVC versions 2018-11-10 15:20:26 +01:00
Abseil Team
de5be0eb28 Googletest export
Move FunctionMocker and MockFunction out of the pump file and implement with variadic templates.

PiperOrigin-RevId: 220640265
2018-11-08 14:49:12 -05:00
misterg
e857f9cdd9 Googletest export
Remove scoped_ptr replace with std::unique_ptr

PiperOrigin-RevId: 219291284
2018-10-30 21:20:43 -04:00
Gennadiy Civil
e9085769d4 Merge pull request #1941 from barkovv:master
PiperOrigin-RevId: 219134349
2018-10-29 13:46:24 -04:00
misterg
80b43d900b Googletest export
Remove linked_ptr and use std::shared_ptr instead

PiperOrigin-RevId: 219129336
2018-10-29 13:46:16 -04:00
Vadim Barkov
3feffddd1e Replaced all NULLs with nullptr in googlemock 2018-10-28 03:27:51 +03:00
Abseil Team
b57c703963 Googletest export
Remove linked_ptr and use std::shared_ptr instead

PiperOrigin-RevId: 218618184
2018-10-26 14:19:59 -04:00
misterg
a50e4f05b3 Googletest export
Remove linked_ptr and use std::shared_ptr instead

PiperOrigin-RevId: 218571466
2018-10-26 14:19:51 -04:00
Gennadiy Civil
20eaf6e3a9 Merge pull request #1911 from BrukerJWD:isnice
PiperOrigin-RevId: 218384341
2018-10-23 15:13:42 -04:00
Abseil Team
29b47e45cf Googletest export
C++11 code cleanup.

PiperOrigin-RevId: 217364243
2018-10-18 11:32:16 -04:00
BrukerJWD
8c82ba48e4
Merge branch 'master' into isnice 2018-10-16 08:37:56 +02:00
Jonathan Wendeborn
67a240a107
Added Mock::IsNaggy, IsNice, and IsStrict 2018-10-16 08:07:15 +02:00
Gennadiy Civil
a651a4d44e Merge pull request #1908 from rwoldberg:master
PiperOrigin-RevId: 216909845
2018-10-12 16:12:32 -04:00
Robert Woldberg
dec3b81a08 Change types to remove cast warnings. 2018-10-12 11:12:55 -06:00
misterg
78761b58fc Remove non-variadic pre C++11 AnyOf
PiperOrigin-RevId: 216411381
2018-10-09 16:30:37 -04:00
Abseil Team
7d3b73c85a Unconditionally use std::tuple.
Remove all mention of TR1 tuple and our own implementation of tuple.

PiperOrigin-RevId: 216395043
2018-10-09 16:25:58 -04:00
misterg
5434989dbd Remove testing::internal::BothOfMatcher, no longer needed
PiperOrigin-RevId: 216389313
2018-10-09 16:25:51 -04:00
misterg
fab35920ad Remove non-variadic pre C++11 AllOf
PiperOrigin-RevId: 216183352
2018-10-08 10:51:03 -04:00
Abseil Team
4bb49ed640 Apply clang-tidy modernize-use-nullptr to googletest.
Now that googletest has moved to C++11, it should no longer
use NULL or 0 for the null pointer. This patch converts all
such usages to nullptr using clang-tidy.

This prevents LLVM from issuing -Wzero-as-null-pointer-constant
warnings.

PiperOrigin-RevId: 215814400
2018-10-05 12:54:14 -04:00
Marco Bubke
7796273056 Merge 86fe8a25eb5a6e4546f9e39cf23a5c764217bf85 into 440527a61e
Closes #1867

PiperOrigin-RevId: 215392714
2018-10-02 13:03:35 -04:00
misterg
ba974c97ac Googletest export
Remove non-variadic pre C++11 ElementsAreMatcher and UnorderedElementsAreMatcher

PiperOrigin-RevId: 214266944
2018-09-25 13:05:17 -04:00
Abseil Team
ffc9baeb4c Googletest export
Treat default-constructed string_view same as constructed from "".
In the context of string comparison (e.g. HasSubstr, StartsWith, EndsWith,
etc.), a default-constructed string_view (nullptr) should be semantically same
as a empty string "".

PiperOrigin-RevId: 212816839
2018-09-14 11:13:48 -04:00
Romain Geissler
93b05da26c Fix gcc misleading indentation again. 2018-09-10 01:45:14 +02:00
misterg
a5cc7aa3fe Googletest export
Fix broken OSS windows build.

PiperOrigin-RevId: 210969049
2018-08-30 21:33:10 -04:00
misterg
2cc008538c Googletest export
Internal Change

PiperOrigin-RevId: 210594341
2018-08-30 21:32:41 -04:00
Gennadiy Civil
9ad739833e
Update gmock-matchers.h 2018-08-29 22:32:08 -04:00
Abseil Team
65d03530e6 Googletest export
Fix line that was wrapping in the middle of a link

This looks uglier, but has the advantage that the link is kept in one
piece.

PiperOrigin-RevId: 210537337
2018-08-28 16:53:52 -04:00
Abseil Team
a0e62d9f1a No longer require a functor passed to ResultOf matcher to define result_of type.
This makes ResultOf more convenient to use. In particular, the matcher now accepts
lambdas.

PiperOrigin-RevId: 210118509
2018-08-27 12:22:26 -04:00
misterg
df428ec118 googletest export
- 209457654 Import of OSS PR, https://github.com/google/googletest/pu... by misterg <misterg@google.com>

PiperOrigin-RevId: 209457654
2018-08-20 14:50:48 -04:00
Abseil Team
ca87cc72e2 googletest export
- 208874130 Copybara tweaks, testing various round-trip sutuations(fu... by misterg <misterg@google.com>
  - 208880646 Fix header guards and remove special case copybara by misterg <misterg@google.com>
  - 208874252 Copybara tweaks for googletest reversible transform by misterg <misterg@google.com>
  - 208853103 Adding a flow to export PR from GitHub into Google3 and a... by misterg <misterg@google.com>
  - 208708150 Removing leakr-sensitive words.  by misterg <misterg@google.com>
  - 208672083 Import of OSS PR 1665 by misterg <misterg@google.com>
  - 208663904 Remove LEAKR "author" warnings for googletest copybara ex... by misterg <misterg@google.com>
  - 208646244 Incrementally finalizing OSS<->google3 transforms by misterg <misterg@google.com>
  - 208548323 Move custom google3 only code to custom/ by misterg <misterg@google.com>
  - 208234974 Removed scrubs, replaced with reversible transforms by misterg <misterg@google.com>
  - 208211213 Move custom tests under custom by misterg <misterg@google.com>
  - 208082996 Replace of OSS insert with reversible replace by misterg <misterg@google.com>
  - 208072299 Replace scrubs with reversible replaces, incrementally ge... by misterg <misterg@google.com>
  - 208059357 Replace scrub with reversible replace by misterg <misterg@google.com>
  - 208055415 Fixing GCC brace warning that shows up in OSS with GCC8 a... by misterg <misterg@google.com>
  - 207933728 Incrementally getting close to the reversible transformat... by misterg <misterg@google.com>
  - 207917581 Removing stripping with replace dictionary entries to eas... by misterg <misterg@google.com>
  - 207911026 Incremental Tweaks, on the way to reversible google3<-> g... by misterg <misterg@google.com>
  - 207905179 Removing unnecessary comments stripping by misterg <misterg@google.com>
  - 207901741 Fix typo in Fuchsia death-test implementation. by Abseil Team <absl-team@google.com>
  - 207776408 Move custom tests into /custom by misterg <misterg@google.com>
  - 207746583 Remove stripping for printer for absl:variant by misterg <misterg@google.com>
  - 207733597 Suppress default exception handling for death-test proces... by Abseil Team <absl-team@google.com>
  - 207719598 Import of googletest from Github. by misterg <misterg@google.com>
  - 207283991 PR1673, extra parentheses in declaration cause GCC 8.1.1 ... by misterg <misterg@google.com>
  - 206986279 Fix Duplicate definition, (original in googletest-test_te... by misterg <misterg@google.com>
  - 206980794 Allow googletest-json-output unitest to handle supporting... by misterg <misterg@google.com>
  - 206957064 Refactor to avoid OSS round-trip transformation problems ... by misterg <misterg@google.com>
  - 206760733 Fixed weird syntax in these tests that was causing OSS tr... by misterg <misterg@google.com>
  - 206750694 Tweak copybara,  by misterg <misterg@google.com>
  - 206611945 Make files consistent to enable copybara round-trip trans... by misterg <misterg@google.com>
  - 206589404 OSS changes to open source two more tests by misterg <misterg@google.com>
  - 206355044 Fixing copybara (was missing comment) by misterg <misterg@google.com>
  - 206323492 Make reversible transforms possible for Copybara OSS<->go... by misterg <misterg@google.com>
  - 206011852 Consolidate various copybara files into one file. by misterg <misterg@google.com>
  - 205999518 remove weird char, should be space. pump and generated .h... by misterg <misterg@google.com>
  - 205897244 Small cleanups to avoid potentially hard-to-reverse OSS t... by misterg <misterg@google.com>
  - 205894405 Simplifying include path for tests. by misterg <misterg@google.com>
  - 205892873 Removing obsolete files by misterg <misterg@google.com>
  - 205873647 Simplifying include path for samples. by misterg <misterg@google.com>
  - 205712910 Continue restructuring, will have common copybara file to... by misterg <misterg@google.com>
  - 205711819 Removing non-ASCII chars by misterg <misterg@google.com>
  - 205702635 Refactor internal googletest name to match OSS Name by misterg <misterg@google.com>
  - 205403311 Comments change by misterg <misterg@google.com>
  - 205246538 OSS community (https://github.com/google/googletest/pull/... by misterg <misterg@google.com>
  - 205242422 Moving RE2 into custom where it rightfully belongs by misterg <misterg@google.com>
  - 205138666 Add a 3-ary Property() matcher overload for ref-qualified... by Abseil Team <absl-team@google.com>
  - 205128154 Automated g4 rollback of changelist 205108639. by misterg <misterg@google.com>
  - 205108639 Moving RE2 into custom where it rightfully belongs by misterg <misterg@google.com>
  - 205102342 Comment link fix by misterg <misterg@google.com>
  - 205097052 OSS sync, still need to worry about not C++11 by misterg <misterg@google.com>
  - 205080271 Keeping up with the changes, ensure that the code still t... by misterg <misterg@google.com>
  - 204815384 Mark the various RE legacy versions of the matchers as de... by Abseil Team <absl-team@google.com>
  - 204744294 OSS, someone noticed that if GTEST_HAS_EXCEPTIONS is set ... by misterg <misterg@google.com>
  - 204363541 Add stacktrace support to the non-Google3 version of Goog... by Abseil Team <absl-team@google.com>
  - 204330832 Google Test: absl::variant is now open source, so add the by Abseil Team <absl-team@google.com>
  - 204130690 Bringing in OSS PR 1647 by misterg <misterg@google.com>
  - 203979061 Set 'reason' field for leakr.disable_check() transformati... by Abseil Team <absl-team@google.com>
  - 203954557 Fixing comments, otherwise copybara leaves extra "//" in ... by misterg <misterg@google.com>
  - 203487065 Correctly handle legacy regular expressions in googletest... by Abseil Team <absl-team@google.com>
  - 201997367 Remove references to GTEST_HAS_PROTOBUF_. by Abseil Team <absl-team@google.com>
  - 201735597 Upgrade gUnit from RE to RE2 -- Step 3/4 by Abseil Team <absl-team@google.com>
  - 201229160 Upgrade gUnit from RE to RE2 -- Step 1/4 by Abseil Team <absl-team@google.com>
  - 201228020 Remove extra copy of gunit samples - there should really ... by misterg <misterg@google.com>
  - 200602156 Eliminate GTEST_TEST_FILTER_ENV_VAR_. by Abseil Team <absl-team@google.com>
  - 200500026 Make RegisterTasks faster by Abseil Team <absl-team@google.com>
  - 200361990 Add IWYU pragmas to gmock headers. by Abseil Team <absl-team@google.com>
  - 200292286 Fix speling by Abseil Team <absl-team@google.com>
  - 200222319 Adding docs to copybara. by misterg <misterg@google.com>
  - 199815917 Fuchsia: Change fdio include path. by Abseil Team <absl-team@google.com>
  - 199195290 Remove launchpad dependency from Fuchsia. by Abseil Team <absl-team@google.com>
  - 199134849 Add printer for std::nullptr_t. by Abseil Team <absl-team@google.com>
  - 198710999 Properly decay variadic matchers by Abseil Team <absl-team@google.com>
  - 197733704 WIP - copybara script capable of google3-to-github  by misterg <misterg@google.com>
  - 197166689 Keeping up, sync cl/197012432 to combined "googletest" di... by misterg <misterg@google.com>
  - 196253300 Keep up with changes,cl/196162435 by misterg <misterg@google.com>
  - 195816901 go/googletest-plan by misterg <misterg@google.com>
  - 195816542 Moving http://cl/167016557 and http://cl/195690905 into c... by misterg <misterg@google.com>
  - 195712930 Following up for http://cl/195677772 More fixing typos, p... by misterg <misterg@google.com>
  - 195702162 Moving http://cl/195020996 into combined dir by misterg <misterg@google.com>
  - 195677772 Fix typos, the original IWYU was  by misterg <misterg@google.com>
  - 195249681 go/googletest-plan , Combine gUnit and gMock into third_p... by misterg <misterg@google.com>

PiperOrigin-RevId: 208874130
2018-08-15 17:15:36 -04:00
Gennadiy Civil
265efde9a5 Comments changes, no functionality changes. 2018-08-14 15:04:11 -04:00
Gennadiy Civil
a3c0dd0f4d Comments changes, no functionality changes 2018-08-14 14:04:07 -04:00
Gennadiy Civil
f225735222 Code formatting changes, clean up, no functionality changes 2018-08-14 11:08:35 -04:00
Gennadiy Civil
c203bee245 formatting custom/README.md 2018-08-13 22:45:53 -04:00
Gennadiy Civil
9060e19c87 formatting for new READMEs 2018-08-13 16:23:17 -04:00
Gennadiy Civil
63baab8924 Move instructions into custom/README files 2018-08-13 14:31:56 -04:00
Gennadiy Civil
18c940d13a comment cleanup 2018-08-13 13:17:38 -04:00
Gennadiy Civil
984cba30ed Formatting changes for automatic code management 2018-07-27 11:15:08 -04:00
Masaru Tsuchiyama
534570b5bd
Merge branch 'master' into feature/fix-build-error-vs2017-win10-jp 2018-07-21 09:18:54 +09:00
Gennadiy Civil
a02af2f689 code merge 2018-07-20 11:28:58 -04:00
duxiuxing
d8db0ca9cf
Merge branch 'master' into googletest_for_asam 2018-07-20 06:16:21 +08:00
杜修杏
2eb4396007 Replace "…" with "..."(three dots) to fix warning C4819 in Visual Studio 2018-07-20 06:15:13 +08:00
Gennadiy Civil
0c17888bcf code sync 2018-07-19 12:42:39 -04:00
duxiuxing
5b19054b02
Merge branch 'master' into googletest_for_asam 2018-07-19 18:38:20 +08:00
Masaru Tsuchiyama
40cd5d1170
Merge branch 'master' into feature/fix-build-error-vs2017-win10-jp 2018-07-19 06:51:13 +09:00
Gennadiy Civil
7e73a7ae6e Formatting and a link 2018-07-18 11:17:19 -04:00
duxiuxing
65a49a73f0 Fix warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss 2018-07-17 15:46:47 +08:00