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

Function AwaitAssertEq

include/process/gtest.hpp:218–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216
217template <typename T1, typename T2>
218::testing::AssertionResult AwaitAssertEq(
219 const char* expectedExpr,
220 const char* actualExpr,
221 const char* durationExpr,
222 const T1& expected,
223 const process::Future<T2>& actual,
224 const Duration& duration)
225{
226 const ::testing::AssertionResult result =
227 AwaitAssertReady(actualExpr, durationExpr, actual, duration);
228
229 if (result) {
230 if (expected == actual.get()) {
231 return ::testing::AssertionSuccess();
232 } else {
233 return ::testing::AssertionFailure()
234 << "Value of: (" << actualExpr << ").get()\n"
235 << " Actual: " << ::testing::PrintToString(actual.get()) << "\n"
236 << "Expected: " << expectedExpr << "\n"
237 << "Which is: " << ::testing::PrintToString(expected);
238 }
239 }
240
241 return result;
242}
243
244
245#define AWAIT_ASSERT_ABANDONED_FOR(actual, duration) \

Callers

nothing calls this directly

Calls 2

AwaitAssertReadyFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected