| 619 | |
| 620 | |
| 621 | inline ::testing::AssertionResult AwaitAssertExitStatusEq( |
| 622 | const char* expectedExpr, |
| 623 | const char* actualExpr, |
| 624 | const char* durationExpr, |
| 625 | const int expected, |
| 626 | const process::Future<Option<int>>& actual, |
| 627 | const Duration& duration) |
| 628 | { |
| 629 | const ::testing::AssertionResult result = |
| 630 | AwaitAssertExited(actualExpr, durationExpr, actual, duration); |
| 631 | |
| 632 | if (result) { |
| 633 | CHECK_READY(actual); |
| 634 | CHECK_SOME(actual.get()); |
| 635 | return AssertExitStatusEq( |
| 636 | expectedExpr, |
| 637 | strings::join("(", actualExpr, ")->get()").c_str(), |
| 638 | expected, |
| 639 | actual->get()); |
| 640 | } |
| 641 | |
| 642 | return result; |
| 643 | } |
| 644 | |
| 645 | |
| 646 | #define AWAIT_ASSERT_WEXITSTATUS_EQ_FOR(expected, actual, duration) \ |
nothing calls this directly
no test coverage detected