Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
testing::status Namespace Reference

Namespaces

namespace  internal
 Implementation of IsOk().
 

Functions

const ::absl::Status & GetStatus (const ::absl::Status &status)
 
template<typename T >
const ::absl::Status & GetStatus (const ::absl::StatusOr< T > &status)
 
template<typename InnerMatcher >
internal::IsOkAndHoldsMatcher< typename std::decay< InnerMatcher >::type > IsOkAndHolds (InnerMatcher &&inner_matcher)
 
internal::IsOkMatcher IsOk ()
 Returns a gMock matcher that matches a Status or StatusOr<> which is OK.
 
template<typename CodeMatcher , typename MessageMatcher >
internal::StatusIsMatcher StatusIs (CodeMatcher code_matcher, MessageMatcher message_matcher)
 
template<typename CodeMatcher >
internal::StatusIsMatcher StatusIs (CodeMatcher code_matcher)
 

Detailed Description

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ GetStatus() [1/2]

const ::absl::Status & testing::status::GetStatus ( const ::absl::Status & status)
inline

Definition at line 28 of file status_matchers.h.

◆ GetStatus() [2/2]

template<typename T >
const ::absl::Status & testing::status::GetStatus ( const ::absl::StatusOr< T > & status)
inline

Definition at line 33 of file status_matchers.h.

◆ IsOk()

internal::IsOkMatcher testing::status::IsOk ( )
inline

Returns a gMock matcher that matches a Status or StatusOr<> which is OK.

Definition at line 149 of file status_matchers.h.

◆ IsOkAndHolds()

template<typename InnerMatcher >
internal::IsOkAndHoldsMatcher< typename std::decay< InnerMatcher >::type > testing::status::IsOkAndHolds ( InnerMatcher && inner_matcher)

Returns a gMock matcher that matches a StatusOr<> whose status is OK and whose value matches the inner matcher.

Definition at line 113 of file status_matchers.h.

◆ StatusIs() [1/2]

template<typename CodeMatcher >
internal::StatusIsMatcher testing::status::StatusIs ( CodeMatcher code_matcher)

Returns a matcher that matches a Status or StatusOr<> whose status code matches code_matcher.

Definition at line 268 of file status_matchers.h.

◆ StatusIs() [2/2]

template<typename CodeMatcher , typename MessageMatcher >
internal::StatusIsMatcher testing::status::StatusIs ( CodeMatcher code_matcher,
MessageMatcher message_matcher )

Returns a matcher that matches a Status or StatusOr<> whose status code matches code_matcher, and whose error message matches message_matcher.

Definition at line 259 of file status_matchers.h.