| 412 | |
| 413 | |
| 414 | inline ::testing::AssertionResult AwaitAssertResponseStatusEq( |
| 415 | const char* expectedExpr, |
| 416 | const char* actualExpr, |
| 417 | const char* durationExpr, |
| 418 | const std::string& expected, |
| 419 | const process::Future<process::http::Response>& actual, |
| 420 | const Duration& duration) |
| 421 | { |
| 422 | const ::testing::AssertionResult result = |
| 423 | AwaitAssertReady(actualExpr, durationExpr, actual, duration); |
| 424 | |
| 425 | if (result) { |
| 426 | if (expected == actual->status) { |
| 427 | return ::testing::AssertionSuccess(); |
| 428 | } else { |
| 429 | return ::testing::AssertionFailure() |
| 430 | << "Value of: (" << actualExpr << ")->status\n" |
| 431 | << " Actual: " << ::testing::PrintToString(actual->status) << "\n" |
| 432 | << "Expected: " << expectedExpr << "\n" |
| 433 | << "Which is: " << ::testing::PrintToString(expected) << "\n" |
| 434 | << " Body: " << ::testing::PrintToString(actual->body); |
| 435 | } |
| 436 | } |
| 437 | |
| 438 | return result; |
| 439 | } |
| 440 | |
| 441 | |
| 442 | #define AWAIT_ASSERT_RESPONSE_STATUS_EQ_FOR(expected, actual, duration) \ |
nothing calls this directly
no test coverage detected