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

Function AwaitAssertFailed

include/process/gtest.hpp:142–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140
141template <typename T>
142::testing::AssertionResult AwaitAssertFailed(
143 const char* expr,
144 const char*, // Unused string representation of 'duration'.
145 const process::Future<T>& actual,
146 const Duration& duration)
147{
148 if (!process::internal::await(actual, duration)) {
149 return ::testing::AssertionFailure()
150 << "Failed to wait " << duration << " for " << expr;
151 } else if (actual.isDiscarded()) {
152 return ::testing::AssertionFailure()
153 << expr << " was discarded";
154 } else if (actual.isReady()) {
155 return ::testing::AssertionFailure()
156 << expr << " is ready (" << ::testing::PrintToString(actual.get()) << ")";
157 }
158
159 return ::testing::AssertionSuccess();
160}
161
162
163template <typename T>

Callers

nothing calls this directly

Calls 4

isDiscardedMethod · 0.80
isReadyMethod · 0.80
awaitFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected