1. 26 Jan, 2021 2 commits
    • ofats's avatar
      Googletest export · 59dea67b
      ofats authored
      Remove scripts for code generating together with related files.
      
      PiperOrigin-RevId: 352805926
      59dea67b
    • Abseil Team's avatar
      Googletest export · 14098f20
      Abseil Team authored
      Merge CONTRIBUTORS, delete LICENSEs in googletest/ and googlemock/
      
      PiperOrigin-RevId: 352558822
      14098f20
  2. 14 Jan, 2021 1 commit
    • Abseil Team's avatar
      Googletest export · c13c27a5
      Abseil Team authored
      Change Matcher<T> to allow binding an implementation by value directly:
       - Drop the requirement of MatcherInterface. Doing manual type erasure avoid
         extra layers in many cases.
       - Avoid the adaptor for `MatcherInterface<T>` and `MatcherInterface<const T&>` mismatch.
       - Use a small object optimization when possible. This makes things like
         `_` and `Eq(1)` really cheap and do not require memory allocations.
       - Migrate some matchers to the new model to speed them up and to test the new framework. More matchers to come in future changes.
      
      PiperOrigin-RevId: 350580998
      c13c27a5
  3. 22 Dec, 2020 2 commits
    • Abseil Team's avatar
      Googletest export · ca4b7c9f
      Abseil Team authored
      Give each of Naggy/Nice/StrictMock a base class whose constructor runs before
      the mocked class's constructor, and a destructor that runs after the mocked
      class's destructor, so that any mock methods run in either the constructor or
      destructor use the same strictness as other calls.
      
      PiperOrigin-RevId: 348511612
      ca4b7c9f
    • dmauro's avatar
      Googletest export · 4f6fa708
      dmauro authored
      Internal Change
      
      PiperOrigin-RevId: 347631521
      4f6fa708
  4. 10 Dec, 2020 1 commit
    • dmauro's avatar
      Googletest export · fb4b3b6b
      dmauro authored
      Fix a missing Bazel build dependency
      
      PiperOrigin-RevId: 346783462
      fb4b3b6b
  5. 09 Dec, 2020 1 commit
    • Abseil Team's avatar
      Googletest export · e5644f5f
      Abseil Team authored
      Introduce a new `Address` matcher to gmock.
      
      PiperOrigin-RevId: 346344591
      e5644f5f
  6. 07 Dec, 2020 1 commit
    • Abseil Team's avatar
      Googletest export · a02a5916
      Abseil Team authored
      Add a `Pointer` matcher as an analog to `Pointee`.
      
      Similar to `Pointee`, `Pointer` works with either raw or smart pointers and
      allows creating a matcher like Pointer(Eq(foo)) for smart pointers.
      
      PiperOrigin-RevId: 346164768
      a02a5916
  7. 03 Dec, 2020 1 commit
    • Abseil Team's avatar
      Googletest export · 93748a94
      Abseil Team authored
      Disable a gmock matcher test under MSVC 2015 (version 14) and earlier.  It interacts badly with Windows structured exceptions in a way we do not have the resources to investigate.  This test passes under MSVC 2017 and SEH.
      
      PiperOrigin-RevId: 345496734
      93748a94
  8. 09 Nov, 2020 1 commit
    • Abseil Team's avatar
      Googletest export · 0c400f67
      Abseil Team authored
      GMock: Make Truly explain when it fails
      
      I just wrote a test that had a matcher of the form
        Optional(AllOf(
          SomeMatcher,
          SomeOtherMatcher,
          Truly(SomePredicate)))
      
      The predicate failed, the other two matchers succeeded, and I got a hard-to-interpret message saying that the value in the optional "didn't match". Didn't match what?
      
      This change improves situations like that slightly by having Truly explain to its result listener when it fails. When there are multiple Trulys in an AllOf, there will be some ambiguity, but it will at least provide more information than right now.
      
      PiperOrigin-RevId: 341105141
      0c400f67
  9. 06 Nov, 2020 1 commit
    • Abseil Team's avatar
      Googletest export · d89b3630
      Abseil Team authored
      Add support for ref qualifiers in MOCK_METHOD.
      
      PiperOrigin-RevId: 341047839
      d89b3630
  10. 14 Oct, 2020 1 commit
    • Abseil Team's avatar
      Googletest export · a4621888
      Abseil Team authored
      Add ::testing::FieldsAre matcher for objects that support get<> and structured bindings.
      PiperOrigin-RevId: 337165285
      a4621888
  11. 27 Aug, 2020 1 commit
  12. 24 Aug, 2020 1 commit
    • Abseil Team's avatar
      Googletest export · fc1e7788
      Abseil Team authored
      Fix DoAll to work with move-only sink arguments.
      
      This changes types of the first n - 1 actions so that they only get a readonly
      view of the arguments. The last action will accept move only objects.
      
      PiperOrigin-RevId: 327031893
      fc1e7788
  13. 07 Aug, 2020 3 commits
    • Abseil Team's avatar
      Googletest export · d0de618a
      Abseil Team authored
      Fixing exception-safety bug in googletest. Previously, if an exception was
      thrown during a call to a mock that would have triggered an error, the error
      was discarded.
      
      Fixes #2890
      
      PiperOrigin-RevId: 325017806
      d0de618a
    • Abseil Team's avatar
      Googletest export · 5a5caab3
      Abseil Team authored
      Fix DoAll to work with move-only sink arguments.
      
      This changes types of the first n - 1 actions so that they only get a readonly
      view of the arguments. The last action will accept move only objects.
      
      PiperOrigin-RevId: 324619666
      5a5caab3
    • Abseil Team's avatar
      Googletest export · 48ec6409
      Abseil Team authored
      Fix DoAll to work with move-only sink arguments.
      
      This changes types of the first n - 1 actions so that they only get a readonly
      view of the arguments. The last action will accept move only objects.
      
      PiperOrigin-RevId: 324600664
      48ec6409
  14. 03 Aug, 2020 8 commits
  15. 15 Jul, 2020 1 commit
    • ofats's avatar
      Googletest export · eb660507
      ofats authored
      Move matchers' tests from *generated* to common files.
      
      PiperOrigin-RevId: 320954068
      eb660507
  16. 09 Jul, 2020 1 commit
  17. 10 Jun, 2020 1 commit
    • Abseil Team's avatar
      Googletest export · 13a433a9
      Abseil Team authored
      Change string matchers, like HasSubstr, to accept `string_view` input if available.
      
      PiperOrigin-RevId: 315726484
      13a433a9
  18. 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
  19. 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
  20. 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
  21. 18 Mar, 2020 2 commits
  22. 17 Mar, 2020 2 commits
    • dmauro's avatar
      Googletest export · c43f7100
      dmauro authored
      Use a polymorphic matcher instead of the GreaterThan<int> test matcher
      to fix the sign-comparison warning on MSVC.
      
      PiperOrigin-RevId: 301163657
      c43f7100
    • Abseil Team's avatar
      Googletest export · 230afdb2
      Abseil Team authored
      Internal change
      
      PiperOrigin-RevId: 299345492
      230afdb2
  23. 28 Feb, 2020 2 commits
    • Abseil Team's avatar
      Googletest export · 909b1ccf
      Abseil Team authored
      Relax the implementation of MatcherCast to allow conversion of `Matcher<T>` to
      `Matcher<const T&>`. They have the same match signature.
      
      PiperOrigin-RevId: 297115843
      909b1ccf
    • 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
  24. 11 Feb, 2020 1 commit
    • Abseil Team's avatar
      Googletest export · 6f5fd0d7
      Abseil Team authored
      Add gmock Matcher<std::string_view> specialization.
      
      PiperOrigin-RevId: 294443240
      6f5fd0d7
  25. 07 Feb, 2020 1 commit
    • Abseil Team's avatar
      Googletest export · 41b5f149
      Abseil Team authored
      Get rid of gmock-generated-matchers.h and gmock-generated-matchers.h.pump.
      
      Stop using pump for MATCHER* macroses generation.
      
      PiperOrigin-RevId: 293878808
      41b5f149