1. 29 Nov, 2022 1 commit
  2. 08 Nov, 2022 1 commit
  3. 21 Oct, 2022 2 commits
  4. 20 Oct, 2022 1 commit
  5. 12 Oct, 2022 1 commit
  6. 08 Sep, 2022 1 commit
    • Abseil Team's avatar
      Remove obsolete MSVC warning pragmas for Invalid<T>() · 0f688540
      Abseil Team authored
      Remove the MSVC pragmas for disabling warning C4717 (infinite recursion) for
      Invalid<T>() because that warning has been fixed in cl/441474979.
      
      PiperOrigin-RevId: 473012585
      Change-Id: I5f1bf88379bd4f2bf005e029c04766ac4caadd84
      0f688540
  7. 01 Sep, 2022 1 commit
  8. 22 Aug, 2022 1 commit
  9. 29 Jul, 2022 1 commit
  10. 25 Jul, 2022 1 commit
  11. 29 Jun, 2022 1 commit
  12. 27 Jun, 2022 2 commits
  13. 01 Jun, 2022 1 commit
    • Derek Mauro's avatar
      Work around a maybe-uninitialized warning under GCC 12 · 0320f517
      Derek Mauro authored
      Some Mock constructors insert the pointer to the Mock itself into a
      global registry. Since GCC cannot see how the pointer is used (only as
      an identifier), it cannot tell that the object doesn't need to be
      initialized at that point at all. Work around this by using uintptr_t
      instead.
      
      PiperOrigin-RevId: 452380347
      Change-Id: Ia5a493057ed90719de1d0efab71de9a8a08ddf8b
      0320f517
  14. 30 May, 2022 1 commit
  15. 27 May, 2022 2 commits
  16. 26 May, 2022 1 commit
    • Aaron Jacobs's avatar
      gmock-spec-builders: move a method to the header. · 56246cdb
      Aaron Jacobs authored
      In order to make the diff more readable in an upcoming commit that requires the
      method to be templated on the action's result type.
      
      PiperOrigin-RevId: 451157029
      Change-Id: I57beb7544efccd0459efb3a1f039ea45cd7c7602
      56246cdb
  17. 13 May, 2022 1 commit
  18. 12 May, 2022 1 commit
  19. 11 May, 2022 2 commits
    • Aaron Jacobs's avatar
      gmock-actions: simplify Return and add better documentation. · 4224c770
      Aaron Jacobs authored
      Better document requirements, API decisions, and historical accidents. Make an
      implicit conversion easier and in a more appropriate place, and ease the burden
      of some assertions in the conversion operator. Stop using the legacy
      ActionInterface style for defining the action.
      
      PiperOrigin-RevId: 447894892
      Change-Id: I179e23ec2abdd9bf05c204ab18dbb492f1372e8e
      4224c770
    • Aaron Jacobs's avatar
      gmock-actions: make OnceAction public. · 6386897f
      Aaron Jacobs authored
      So that it can be referenced in conversion operators for actions that need to
      know the concrete return type.
      
      PiperOrigin-RevId: 447889344
      Change-Id: I643d3298bc8effd08741282a956c221f9d67d378
      6386897f
  20. 03 May, 2022 1 commit
  21. 02 May, 2022 2 commits
    • Aaron Jacobs's avatar
      gmock-actions: remove a no-longer-necessary friend declaration. · 42ca3da5
      Aaron Jacobs authored
      PiperOrigin-RevId: 445940487
      Change-Id: I26952a72327db0d308bbe57ca4d1d91a0d7defc8
      42ca3da5
    • Aaron Jacobs's avatar
      gmock-actions: support ByMove in a specialization of ReturnAction. · 51767261
      Aaron Jacobs authored
      Rather than branching on whether the return type is ByMoveWrapper within
      ReturnAction itself, hoist the distinction to outside. This allows the main
      class template to be modified without worrying about this special case, which
      means we can stop using a shared pointer to the value (introduced as a
      linked_ptr in commit 3d1c78b2 to support ByMove) in this commit and simplify
      the class template further in a future commit with the eventual aim of directly
      supporting move-only result types.
      
      PiperOrigin-RevId: 445938943
      Change-Id: I7bc71ea301d5e493ac6ecbe57d62738a48a2721a
      51767261
  22. 27 Apr, 2022 1 commit
  23. 26 Apr, 2022 2 commits
  24. 22 Apr, 2022 1 commit
  25. 21 Apr, 2022 1 commit
  26. 13 Apr, 2022 2 commits
  27. 09 Apr, 2022 1 commit
    • Abseil Team's avatar
      Add support for move-only and &&-qualified actions in WillOnce. · a1cc8c55
      Abseil Team authored
      This provides a type-safe way for an action to express that it wants to be
      called only once, or to capture move-only objects. It is a generalization of
      the type system-evading hack in ByMove, with the improvement that it works for
      _any_ action (including user-defined ones), and correctly expresses that the
      action can only be used with WillOnce. I'll make existing actions benefit in a
      future commit.
      
      PiperOrigin-RevId: 440496139
      Change-Id: I4145d191cca5655995ef41360bb126c123cb41d3
      a1cc8c55
  28. 04 Apr, 2022 3 commits
    • Abseil Team's avatar
      gmock: improve SFINAE for actions involving arguments. · 137f67e9
      Abseil Team authored
      Avoid instantiating functions like std::get<index> for an out of range index
      when doing SFINAE on the invocability of the action itself.
      
      PiperOrigin-RevId: 439415110
      Change-Id: Ifc20285a6d526c34830870cd1910c2b2b92e1e81
      137f67e9
    • Abseil Team's avatar
      Use ResultOf()'s result_description when explaining match result. · 3ffa237f
      Abseil Team authored
      PiperOrigin-RevId: 439389646
      Change-Id: Ie34adcdd2b24378e85962efac53b7bb89ed93803
      3ffa237f
    • Derek Mauro's avatar
      Use the Abseil flags library when Abseil is present · 25dcdc7e
      Derek Mauro authored
      When built with `--define=absl=1` under Bazel, GoogleTest
      flags use ABSL_FLAG instead of GoogleTest's own implementation.
      
      There are some minor behavior differences in this mode.
      
      The most notable difference is that unrecognized flags result
      in a flag parsing error, and are not returned to the user though
      a modified argc/argv, unless they appear after the positional
      argument delimiter ("--").
      
      For example, to pass a non-Abseil flag, you would have to do
      ./mytest --gtest_color=false -- --myflag=myvalue
      
      The documentation at https://abseil.io/docs/cpp/guides/flags
      may be helpful in understanding the behavior.
      
      There are some other minor differences. For example,
      passing --help results in the program returning 1 instead of 0.
      
      https://github.com/google/googletest/issues/3646
      
      PiperOrigin-RevId: 439312700
      Change-Id: Id696a25f50f24a5b1785c45ca8fa59794f86fd5c
      25dcdc7e
  29. 15 Mar, 2022 1 commit
    • Abseil Team's avatar
      Running clang-format over all of GoogleTest · b007c54f
      Abseil Team authored
      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
      b007c54f
  30. 08 Mar, 2022 1 commit
    • Abseil Team's avatar
      Mark ACTION_Pn()-generated functions as must-use-result, adding non-compilation tests. · ae1b7ad4
      Abseil Team authored
      This catches when a client creates an action and discards it, thinking that the action has actually been applied to something.
      
      This will help people who make the mistake of defining, for example, both `void Use(Foo*, Bar)` and `ACTION_P(Use, bar) { Use(arg, bar); }` for later application to a Foo.  With such an overload, a client may then write `Use(bar);`, selecting the Action<> overload and being confused why nothing happens.
      
      This also catches when a client defines their own action in terms of an ACTION_P()-generated one, invokes the Action<>'s builder, and then fails to invoke the resulting action, thinking it's operating on the outer action's parameters.
      
      PiperOrigin-RevId: 433197479
      Change-Id: I98e4389150d01a5e753230113016d9fc38b1d260
      ae1b7ad4
  31. 10 Feb, 2022 1 commit