MCPcopy Create free account
hub / github.com/3rdparty/libprocess / ACTION_TEMPLATE

Function ACTION_TEMPLATE

include/process/gmock.hpp:72–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70
71
72ACTION_TEMPLATE(PromiseArg,
73 HAS_1_TEMPLATE_PARAMS(int, k),
74 AND_1_VALUE_PARAMS(promise))
75{
76 // TODO(benh): Use a shared_ptr for promise to defend against this
77 // action getting invoked more than once (e.g., used via
78 // WillRepeatedly). We won't be able to set it a second time but at
79 // least we won't get a segmentation fault. We could also consider
80 // warning users if they attempted to set it more than once.
81 promise->set(std::get<k>(args));
82 delete promise;
83}
84
85
86template <int index, typename T>

Callers

nothing calls this directly

Calls 1

setMethod · 0.45

Tested by

no test coverage detected