Commit Graph

222 Commits

Author SHA1 Message Date
Gennadiy Rozental
db13ff1f0b Merge pull request #2597 from kuzkry:remove-workaround_Nokia-Sybian-SafeMatcherCastImpl
PiperOrigin-RevId: 282581402
2019-11-26 15:47:21 -05:00
Abseil Team
717ce7feb8 Googletest export
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
2019-11-22 16:33:15 -05:00
Krystian Kuzniarek
bbbc5d8a4b remove Nokia's Symbian compiler workaround: SafeMatcherCastImpl 2019-11-22 17:25:34 +01:00
Krystian Kuzniarek
e0c80b0a6e consistency fix for SafeMatcherCastImpl member functions 2019-11-22 17:25:34 +01:00
Abseil Team
50cfbb726b Googletest export
Update stale comments to point to proper location.

PiperOrigin-RevId: 281157036
2019-11-19 11:25:59 -05:00
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