1. 24 Jan, 2023 2 commits
    • Tom Hughes's avatar
      Fix formatting of C++ files · 24917105
      Tom Hughes authored
      PiperOrigin-RevId: 504325204
      Change-Id: Iaa1d6d0ab1dccaaeef26f9cb109d530835499240
      24917105
    • Derek Mauro's avatar
      Remove FloatingPoint::Max() in favor of std::numeric_limits::max() · 544c96ed
      Derek Mauro authored
      In #4113 a user says Max clashes with a macro. Since it is only used in
      a test, use std::numeric_limits::max() instead.
      
      Note that in headers, the macro issue can be mitigated with
      parenthesis like this: `(std::numeric_limits<T>::max)()`
      
      PiperOrigin-RevId: 504284906
      Change-Id: Ibf430caec1a6afdf6b303534fec6a4fd00a6373f
      544c96ed
  2. 17 Jan, 2023 2 commits
  3. 12 Jan, 2023 1 commit
    • Tom Hughes's avatar
      Fix -Wshadow warnings · 356fc301
      Tom Hughes authored
      ../googlemock/test/gmock-actions_test.cc:687:36: warning: declaration of ‘v’ shadows a member of ‘testing::{anonymous}::ReturnTest_SupportsReferenceLikeReturnType_Test::TestBody()::Result’ [-Wshadow]
        687 |     Result(const std::vector<int>& v) : v(&v) {}  // NOLINT
            |            ~~~~~~~~~~~~~~~~~~~~~~~~^
      ../googlemock/test/gmock-actions_test.cc:686:29: note: shadowed declaration is here
        686 |     const std::vector<int>* v;
            |                             ^
      
      ../googlemock/test/gmock-actions_test.cc: In constructor ‘testing::{anonymous}::ReturnTest_PrefersConversionOperator_Test::TestBody()::Out::Out(int)’:
      ../googlemock/test/gmock-actions_test.cc:720:28: warning: declaration of ‘x’ shadows a member of ‘testing::{anonymous}::ReturnTest_PrefersConversionOperator_Test::TestBody()::Out’ [-Wshadow]
        720 |     explicit Out(const int x) : x(x) {}
            |                  ~~~~~~~~~~^
      ../googlemock/test/gmock-actions_test.cc:718:9: note: shadowed declaration is here
        718 |     int x;
            |         ^
      
      PiperOrigin-RevId: 501580618
      Change-Id: I584710fbbe440ec724f88746e51f3be5653c32d5
      356fc301
  4. 30 Nov, 2022 1 commit
    • Abseil Team's avatar
      Make SizeIsMatcher::Impl conform to the contract of MatcherDescriberInterface. · 1f643f71
      Abseil Team authored
      MatcherDescriberInterface specifies that DescribeTo "should print a verb phrase", but "size ..." is not a verb phrase. Currently, ElementsAre(SizeIs(9)) is described as "has 1 element that size is equal to 9". With this change, it will be described as "has 1 element that has a size that is equal to 9".
      
      PiperOrigin-RevId: 492022324
      Change-Id: I4083335f2419462464957521c1e033643b53b763
      1f643f71
  5. 29 Nov, 2022 1 commit
  6. 22 Aug, 2022 1 commit
  7. 29 Jul, 2022 1 commit
  8. 25 Jul, 2022 1 commit
  9. 01 Jul, 2022 2 commits
  10. 27 Jun, 2022 1 commit
  11. 22 Jun, 2022 1 commit
  12. 27 May, 2022 2 commits
  13. 13 May, 2022 1 commit
  14. 12 May, 2022 1 commit
  15. 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
  16. 27 Apr, 2022 1 commit
  17. 26 Apr, 2022 3 commits
  18. 22 Apr, 2022 1 commit
  19. 13 Apr, 2022 1 commit
  20. 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
  21. 04 Apr, 2022 1 commit
  22. 23 Mar, 2022 2 commits
  23. 18 Mar, 2022 1 commit
  24. 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
  25. 10 Feb, 2022 1 commit
  26. 26 Jan, 2022 1 commit
  27. 27 Dec, 2021 1 commit
  28. 22 Dec, 2021 1 commit
  29. 03 Dec, 2021 1 commit
  30. 15 Nov, 2021 1 commit
    • Taylor Cramer's avatar
      Clarify "Times() after X" error message · 1a3e2a26
      Taylor Cramer authored
      The previous error message could be misinterpreted to mean that `Times` could not be
      used in combination with `WillRepeatedly`, when in fact the call to `Times` just needs to happen *first*.
      
      PiperOrigin-RevId: 410070405
      Change-Id: I747d34a4334cf2e56d589dcad3a08a8f322d77c8
      1a3e2a26
  31. 12 Nov, 2021 1 commit
  32. 05 Nov, 2021 1 commit