Use GetStatus in IsOkAndHoldsMatcher

PiperOrigin-RevId: 651093644
Change-Id: Ia5bb3343ef06529d5fa2d469bcad47451ea79c69
This commit is contained in:
Laramie Leavitt
2024-07-10 11:28:46 -07:00
committed by Copybara-Service
parent 6dee153242
commit bb50cad0ad

View File

@@ -69,8 +69,8 @@ class IsOkAndHoldsMatcherImpl
bool MatchAndExplain(
StatusOrType actual_value,
::testing::MatchResultListener* result_listener) const override {
if (!actual_value.ok()) {
*result_listener << "which has status " << actual_value.status();
if (!GetStatus(actual_value).ok()) {
*result_listener << "which has status " << GetStatus(actual_value);
return false;
}