| 118 | |
| 119 | template <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 | |
| 141 | template <typename T> |
no test coverage detected