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

Function AwaitAssertDiscarded

include/process/gtest.hpp:164–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162
163template <typename T>
164::testing::AssertionResult AwaitAssertDiscarded(
165 const char* expr,
166 const char*, // Unused string representation of 'duration'.
167 const process::Future<T>& actual,
168 const Duration& duration)
169{
170 if (!process::internal::await(actual, duration)) {
171 return ::testing::AssertionFailure()
172 << "Failed to wait " << duration << " for " << expr;
173 } else if (actual.isFailed()) {
174 return ::testing::AssertionFailure()
175 << "(" << expr << ").failure(): " << actual.failure();
176 } else if (actual.isReady()) {
177 return ::testing::AssertionFailure()
178 << expr << " is ready (" << ::testing::PrintToString(actual.get()) << ")";
179 }
180
181 return ::testing::AssertionSuccess();
182}
183
184
185template <typename T>

Callers

nothing calls this directly

Calls 4

isFailedMethod · 0.80
isReadyMethod · 0.80
awaitFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected