30::testing::AssertionResult
IsOkAndHolds(
const absl::StatusOr<T>& status_or,
32 if (!status_or.ok()) {
33 return ::testing::AssertionFailure()
34 <<
"Expected status to be OK, but got: " << status_or.status();
36 if (status_or.value() != value) {
37 return ::testing::AssertionFailure() <<
"Expected value to be " << value
38 <<
", but got: " << status_or.value();
40 return ::testing::AssertionSuccess();