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

Function AwaitAssertReady

include/process/gtest.hpp:120–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118
119template <typename T>
120::testing::AssertionResult AwaitAssertReady(
121 const char* expr,
122 const char*, // Unused string representation of 'duration'.
123 const process::Future<T>& actual,
124 const Duration& duration)
125{
126 if (!process::internal::await(actual, duration)) {
127 return ::testing::AssertionFailure()
128 << "Failed to wait " << duration << " for " << expr;
129 } else if (actual.isDiscarded()) {
130 return ::testing::AssertionFailure()
131 << expr << " was discarded";
132 } else if (actual.isFailed()) {
133 return ::testing::AssertionFailure()
134 << "(" << expr << ").failure(): " << actual.failure();
135 }
136
137 return ::testing::AssertionSuccess();
138}
139
140
141template <typename T>

Callers 6

AwaitAssertEqFunction · 0.85
AwaitAssertExitedFunction · 0.85
AwaitAssertSignaledFunction · 0.85

Calls 3

isDiscardedMethod · 0.80
isFailedMethod · 0.80
awaitFunction · 0.70

Tested by

no test coverage detected