Commit Graph

34 Commits

Author SHA1 Message Date
Abseil Team
b007c54f29 Running clang-format over all of GoogleTest
A few tests are examining code locations and looking af the resulting line
numbers to verify that GoogleTest shows those to users correctly. Some of those
locations change when clang-format is run. For those locations, I've wrapped
portions in:
// clang-format off
...
// clang-format on

There may be other locations that are currently not tickled by running
clang-format.

PiperOrigin-RevId: 434844712
Change-Id: I3a9f0a6f39eff741c576b6de389bef9b1d11139d
2022-03-15 13:42:11 -07:00
Abseil Team
6b74da4757 Include the param names in the generated description of the MATCHER_P matchers.
PiperOrigin-RevId: 418497526
Change-Id: Ie53c3c0810c10a32cbcb941e3ca1ee8fb1ddd9f9
2021-12-27 08:05:24 -08:00
Abseil Team
d61d4d8e64 Support std::reference_wapper as a smart pointer type in gmock
PiperOrigin-RevId: 413963503
Change-Id: I33440780bf087698f4e4325399227405885430b3
2021-12-03 10:14:13 -08:00
Abseil Team
b3062166a1 Googletest export
Internal change

PiperOrigin-RevId: 405710296
2021-11-03 13:45:46 -04:00
Abseil Team
6202251f09 Googletest export
Introduce GMOCK_FLAG_GET and GMOCK_FLAG_SET macros.

PiperOrigin-RevId: 396649214
2021-09-15 13:33:42 -04:00
Abseil Team
652ec31f9f Googletest export
Introduce a new matcher for unescaping Base-64 strings to gmock.

PiperOrigin-RevId: 388471904
2021-08-04 13:54:39 -04:00
Abseil Team
977cffc442 Googletest export
Introduce GTEST_FLAG_GET and GTEST_FLAG_SET macros.

PiperOrigin-RevId: 382808313
2021-07-07 14:34:19 -04:00
Abseil Team
a02a591605 Googletest export
Add a `Pointer` matcher as an analog to `Pointee`.

Similar to `Pointee`, `Pointer` works with either raw or smart pointers and
allows creating a matcher like Pointer(Eq(foo)) for smart pointers.

PiperOrigin-RevId: 346164768
2020-12-07 18:04:12 -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
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
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
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
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
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
Abseil Team
f1883b1824 Googletest export
Remove mention of unused type ProtocolMessage.

PiperOrigin-RevId: 239242706
2019-03-21 10:43:06 -04:00
Abseil Team
a1dd07786b Googletest export
Build gmock cleanly with clang -Wextra-semi and -Wextra-semi-stmt

Extends 56ef07a203 to take -Wc++98-compat-extra-semi
(https://reviews.llvm.org/D43162) and -Wextra-semi-stmt
(https://reviews.llvm.org/D52695) into account.

For https://crbug.com/926235.

PiperOrigin-RevId: 236643095
2019-03-05 08:39:28 -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
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
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
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
misterg
80b43d900b Googletest export
Remove linked_ptr and use std::shared_ptr instead

PiperOrigin-RevId: 219129336
2018-10-29 13:46:16 -04: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
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
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
Gennadiy Civil
a3c0dd0f4d Comments changes, no functionality changes 2018-08-14 14:04:07 -04:00
Gennadiy Civil
b7c568326c merging, gmock -1 2018-03-22 15:35:37 -04:00
Gennadiy Civil
1c09831acc upstreaming cl 124976692 2018-01-03 16:57:05 -05:00
Jonathan Wakely
b70cf1a663 Use gender-neutral pronouns in comments and docs 2017-09-27 13:31:13 +01:00
Nico Weber
09fd5b3ebf Use std::string and ::string explicitly in gtest and gmock code.
This merges a Google-internal change (117235625).

Original CL description:
This CL was created manually in about an hour with sed, a Python script
to find all the places unqualified 'string' was mentioned, and some help
from Emacs to add the "std::" qualifications, plus a few manual tweaks.
2017-05-15 17:53:04 -04:00
Billy Donahue
b78f858d0c Include <memory> to use std::unique_ptr. 2015-09-08 02:46:25 -04:00
Billy Donahue
affb09edf0 move googlemock files into googlemock/ subdir 2015-08-25 17:47:18 -04:00