Skip to content

Commit

Permalink
test: fix gMock to work with gcc >= 6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddrysdale committed Sep 26, 2016
1 parent f513ad7 commit 0d46f76
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/gmock-1.7.0/include/gmock/gmock-spec-builders.h
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,7 @@ class ActionResultHolder : public UntypedActionResultHolderBase {
template <>
class ActionResultHolder<void> : public UntypedActionResultHolderBase {
public:
explicit ActionResultHolder() {}
void GetValueAndDelete() const { delete this; }

virtual void PrintAsActionResult(::std::ostream* /* os */) const {}
Expand All @@ -1381,7 +1382,7 @@ class ActionResultHolder<void> : public UntypedActionResultHolderBase {
const typename Function<F>::ArgumentTuple& args,
const string& call_description) {
func_mocker->PerformDefaultAction(args, call_description);
return NULL;
return new ActionResultHolder();
}

// Performs the given action and returns NULL.
Expand All @@ -1390,7 +1391,7 @@ class ActionResultHolder<void> : public UntypedActionResultHolderBase {
const Action<F>& action,
const typename Function<F>::ArgumentTuple& args) {
action.Perform(args);
return NULL;
return new ActionResultHolder();
}
};

Expand Down

0 comments on commit 0d46f76

Please sign in to comment.