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. 05 Jan, 2023 1 commit
  5. 15 Dec, 2022 1 commit
    • Abseil Team's avatar
      Shut up a Clang warning. · 3fa7f983
      Abseil Team authored
      Clang warns on this pattern because it looks like the author might
      have meant to use the value of the first part of the comma operator,
      so it warns that it isn't being used. The cast here signals to Clang
      that this behavior is intentional.
      
      This was discovered while updating gmock in Android. Clang's -Wcomma
      warning is on by default with either -Wall or -Werror, so users of
      gmock with those on in combination with -Werror are unable to build
      without this fix.
      
      PiperOrigin-RevId: 495655990
      Change-Id: Iaf27e2199669f5b6185a877738234e551b6b6556
      3fa7f983
  6. 12 Dec, 2022 1 commit
  7. 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
  8. 29 Nov, 2022 1 commit
  9. 08 Nov, 2022 1 commit
  10. 21 Oct, 2022 2 commits
  11. 20 Oct, 2022 1 commit
  12. 12 Oct, 2022 1 commit
  13. 26 Sep, 2022 1 commit
  14. 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
  15. 01 Sep, 2022 1 commit
  16. 22 Aug, 2022 1 commit
  17. 29 Jul, 2022 1 commit
  18. 25 Jul, 2022 1 commit
  19. 01 Jul, 2022 3 commits
  20. 29 Jun, 2022 1 commit
  21. 27 Jun, 2022 5 commits
  22. 26 Jun, 2022 1 commit
  23. 22 Jun, 2022 1 commit
  24. 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
  25. 30 May, 2022 1 commit
  26. 27 May, 2022 2 commits
  27. 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
  28. 17 May, 2022 1 commit
  29. 13 May, 2022 1 commit
  30. 12 May, 2022 1 commit