]> git-server-git.apps.pok.os.sepia.ceph.com Git - googletest.git/log
googletest.git
3 years agoMerge branch 'google:main' into simplify_shouldusecolor
Gaspard Petit [Tue, 31 May 2022 02:01:15 +0000 (22:01 -0400)]
Merge branch 'google:main' into simplify_shouldusecolor

3 years agogmock-spec-builders: remove the name for an unused parameter.
Aaron Jacobs [Mon, 30 May 2022 19:46:29 +0000 (12:46 -0700)]
gmock-spec-builders: remove the name for an unused parameter.

This fixes unused parameter errors under both MSVC and clang (when
`-Werror=unused-parameter` is used, as reported
[here](https://github.com/google/googletest/commit/9d21db9e0a60a1ea61ec19331c9bc0dd33e907b1#r74769946)).

Fixes #3858

PiperOrigin-RevId: 451907906
Change-Id: Ic07da19ea6a547eb1797fbbab19cd57cc2a83fe8

3 years agoSimplify ColoredPrintf to rely on ShouldUseColor
Gaspard Petit [Mon, 30 May 2022 17:34:17 +0000 (13:34 -0400)]
Simplify ColoredPrintf to rely on ShouldUseColor

Use ShouldUseColor to set use_color instead of having a separate check for the windows mobile cases; these cases are now moved directly to `DoIsATTY`

3 years agogmock-spec-builders: add support for non-moveable types.
Aaron Jacobs [Fri, 27 May 2022 22:24:50 +0000 (15:24 -0700)]
gmock-spec-builders: add support for non-moveable types.

Do this by ripping out the "untyped perform action" machinery, which isn't
necessary: we can simply template the entry point on the result type, and use
RAII to avoid the need to special case void. This makes it easier to understand
the code and harder to introduce type-related undefined behavior, to boot.
PiperOrigin-RevId: 451493451
Change-Id: I225305f83164752ca92f2916721972eafba33168

3 years agoClarify that `this->` is needed to access members of type-parameterized tests.
elixir [Fri, 27 May 2022 18:31:26 +0000 (11:31 -0700)]
Clarify that `this->` is needed to access members of type-parameterized tests.

PiperOrigin-RevId: 451439108
Change-Id: I8929df21d53cbe6c42e38653e1bb0cac72fc36f9

3 years agogmock-actions: properly support non-moveable results in `is_callable_r`.
Aaron Jacobs [Fri, 27 May 2022 09:23:19 +0000 (02:23 -0700)]
gmock-actions: properly support non-moveable results in `is_callable_r`.

Previously this excluded callables that return non-moveable types. This is the
same as the
[libc++ std::is_invocable_r bug](https://github.com/llvm/llvm-project/issues/55346)
fixed by
[this commit](https://github.com/llvm/llvm-project/commit/c3a24882903d): it's
wrong to use std::is_convertible for checking the return type, since (despite
its name) that doesn't check the standard-defined notion of "implicitly
convertible". Instead we must base the check on whether the source type can be
used as an argument to a function that accepts the destination type.

PiperOrigin-RevId: 451341205
Change-Id: I2530051312a0361ea7a2ce26993ae973c9242089