1. 24 Jan, 2023 1 commit
  2. 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
  3. 01 Jul, 2022 1 commit
  4. 27 May, 2022 1 commit
  5. 13 May, 2022 1 commit
  6. 12 May, 2022 1 commit
  7. 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
  8. 27 Apr, 2022 1 commit
  9. 26 Apr, 2022 2 commits
  10. 22 Apr, 2022 1 commit
  11. 13 Apr, 2022 1 commit
  12. 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
  13. 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
  14. 24 Jul, 2021 1 commit
  15. 15 Apr, 2021 1 commit
  16. 28 May, 2020 2 commits
    • durandal's avatar
      Googletest export · a0669e07
      durandal authored
      Silence MSVC C4100 (unused formal parameter) to fix breakage from recently added testcase.  This warning is silenced in many files throughout googletest, but was not needed here until this testcase was added.
      
      PiperOrigin-RevId: 312121200
      a0669e07
    • Abseil Team's avatar
      Googletest export · 63713e1c
      Abseil Team authored
      Fix the ACTION* macros to allow for more than 10 arguments in the action.
      Only the first 10 will be passed as individual arguments as `argN`, but the rest
      can be accessed from the `args` tuple.
      
      PiperOrigin-RevId: 311542098
      63713e1c
  17. 01 May, 2020 1 commit
    • Abseil Team's avatar
      Googletest export · 95555251
      Abseil Team authored
      Rewrite ReturnNew action without using pump.
      
      PiperOrigin-RevId: 308219616
      95555251
  18. 24 Apr, 2020 1 commit
    • Arthur O'Dwyer's avatar
      Remove all uses of GTEST_DISALLOW_{MOVE_,}ASSIGN_. · 766ac2e1
      Arthur O'Dwyer authored
      None of these are strictly needed for correctness.
      A large number of them (maybe all of them?) trigger `-Wdeprecated`
      warnings on Clang trunk as soon as you try to use the implicitly
      defaulted (but deprecated) copy constructor of a class that has
      deleted its copy assignment operator.
      
      By declaring a deleted copy assignment operator, the old code
      also caused the move constructor and move assignment operator
      to be non-declared. This means that the old code never got move
      semantics -- "move-construction" would simply call the defaulted
      (but deprecated) copy constructor instead. With the new code,
      "move-construction" calls the defaulted move constructor, which
      I believe is what we want to happen. So this is a runtime
      performance optimization.
      
      Unfortunately we can't yet physically remove the definitions
      of these macros from gtest-port.h, because they are being used
      by other code internally at Google (according to zhangxy988).
      But no new uses should be added going forward.
      766ac2e1
  19. 28 Feb, 2020 1 commit
    • Abseil Team's avatar
      Googletest export · fd538161
      Abseil Team authored
      Allow construction of an Action from a callable of zero args
      
      Action already allows construction from a callable with the same args as the mocked function, without needing to wrap the callable in Invoke. However, if you don't care about the arguments to the mocked function you need to either accept all of them or wrap your callable in InvokeWithoutArgs. This change makes both of those unnecessary, since it allows you to pass a no-args callable to Action directly.
      
      PiperOrigin-RevId: 296117034
      fd538161
  20. 22 Nov, 2019 1 commit
    • Abseil Team's avatar
      Googletest export · 717ce7fe
      Abseil Team authored
      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
      717ce7fe
  21. 25 Oct, 2019 2 commits
  22. 24 Oct, 2019 1 commit
  23. 23 Oct, 2019 2 commits
  24. 22 Oct, 2019 1 commit
  25. 15 Aug, 2019 1 commit
    • Abseil Team's avatar
      Googletest export · d44b137f
      Abseil Team authored
      Remove legacy support for signed wchar_t and unsigned wchar_t.
      
      Clang now errors out on these types as well by default. Rather than making the
      condition for these types even more complicated, just remove the tests covering
      these types since they don't seem to justify the maintenance burden. We
      can reasonably expect these types to work in compilers that support them
      without needing specific tests for them since they are treated as standard
      integral types.
      
      PiperOrigin-RevId: 263577673
      d44b137f
  26. 01 Apr, 2019 1 commit
    • Abseil Team's avatar
      Googletest export · d9825431
      Abseil Team authored
      Remove support for "global" ::string and ::wstring types.
      This support existed for legacy codebases that existed from before namespaces
      where a thing. It is no longer necessary.
      
      PiperOrigin-RevId: 241335738
      d9825431
  27. 17 Jan, 2019 1 commit
    • Abseil Team's avatar
      Googletest export · 0adeadd2
      Abseil Team authored
      Refactor the `Invoke` and `InvokeWithoutArgs` actions:
       - Replace pump'd classes and functions with templates.
       - Make the polymorphic actions be polymorphic functors instead.
       - Fix Invoke(Callback*) to work with subclasses of the callbacks, instead of trying to diagnose that in gmock_doctor.
      
      PiperOrigin-RevId: 229604112
      0adeadd2
  28. 14 Jan, 2019 1 commit
    • Abseil Team's avatar
      Googletest export · 097407fd
      Abseil Team authored
      Deduplicate testing::ReferenceWrapper with std::reference_wrapper.
      Minor cleanups in matchers_test.
      
      PiperOrigin-RevId: 229022872
      097407fd
  29. 02 Jan, 2019 2 commits
    • misterg's avatar
      Googletest export · 14c2fba7
      misterg authored
      Internal Change
      
      PiperOrigin-RevId: 227575279
      14c2fba7
    • Abseil Team's avatar
      Googletest export · f8b1c1af
      Abseil Team authored
      Remove the #ifs for old, unsupported and buggy compilers:
      * old versions of GCC & MSVC
      * Symbian
      
      PiperOrigin-RevId: 227116941
      f8b1c1af
  30. 20 Dec, 2018 1 commit
    • Abseil Team's avatar
      Googletest export · e26a3fa1
      Abseil Team authored
      Unifdef c++11-related macros from googletest now that it requires C++11.
      
      PiperOrigin-RevId: 225905601
      e26a3fa1
  31. 03 Dec, 2018 1 commit
    • Abseil Team's avatar
      Googletest export · 26743363
      Abseil Team authored
      Applied fixes for ClangTidy modernize-use-override and modernize-use-using.
      
      PiperOrigin-RevId: 223800219
      26743363
  32. 20 Nov, 2018 3 commits
    • misterg's avatar
      Googletest export · a3013cce
      misterg authored
      Fix broken OSS build
      
      PiperOrigin-RevId: 222244158
      a3013cce
    • Abseil Team's avatar
      Googletest export · 64368e05
      Abseil Team authored
      Remove redundant Base/Derived types.
      
      PiperOrigin-RevId: 222243634
      64368e05
    • Abseil Team's avatar
      Googletest export · aac18185
      Abseil Team authored
      Upgrade WithArgs family of actions to C++11.
      
      PiperOrigin-RevId: 221671690
      aac18185