| 462 | |
| 463 | |
| 464 | inline ::testing::AssertionResult AwaitAssertResponseBodyEq( |
| 465 | const char* expectedExpr, |
| 466 | const char* actualExpr, |
| 467 | const char* durationExpr, |
| 468 | const std::string& expected, |
| 469 | const process::Future<process::http::Response>& actual, |
| 470 | const Duration& duration) |
| 471 | { |
| 472 | const ::testing::AssertionResult result = |
| 473 | AwaitAssertReady(actualExpr, durationExpr, actual, duration); |
| 474 | |
| 475 | if (result) { |
| 476 | if (expected == actual->body) { |
| 477 | return ::testing::AssertionSuccess(); |
| 478 | } else { |
| 479 | return ::testing::AssertionFailure() |
| 480 | << "Value of: (" << actualExpr << ")->body\n" |
| 481 | << " Actual: " << ::testing::PrintToString(actual->body) << "\n" |
| 482 | << "Expected: " << expectedExpr << "\n" |
| 483 | << "Which is: " << ::testing::PrintToString(expected); |
| 484 | } |
| 485 | } |
| 486 | |
| 487 | return result; |
| 488 | } |
| 489 | |
| 490 | |
| 491 | #define AWAIT_ASSERT_RESPONSE_BODY_EQ_FOR(expected, actual, duration) \ |
nothing calls this directly
no test coverage detected