Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Unified Diff: testing/gmock_mutant.h

Issue 2758713002: Avoid to use the method pointer to Callback<>::Run on gmock tests (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/renderers/video_renderer_impl_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/gmock_mutant.h
diff --git a/testing/gmock_mutant.h b/testing/gmock_mutant.h
index 961673fa110eb792d1ff3540f6c46721301b4398..2a41cf54da750fd265b35b49b362734a0901e19c 100644
--- a/testing/gmock_mutant.h
+++ b/testing/gmock_mutant.h
@@ -113,6 +113,12 @@ CallbackToFunctor(const base::Callback<Signature>& cb) {
return CallbackToFunctorHelper<Signature>(cb);
}
+template <typename Functor>
+CallbackToFunctorHelper<typename Functor::RunType> CreateFunctor(
+ Functor functor) {
+ return CallbackToFunctor(functor);
+}
+
template <typename Functor, typename... BoundArgs>
CallbackToFunctorHelper<base::MakeUnboundRunType<Functor, BoundArgs...>>
CreateFunctor(Functor functor, const BoundArgs&... args) {
« no previous file with comments | « media/renderers/video_renderer_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698