#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "absl/status/status.h"
#include "absl/status/statusor.h"
Go to the source code of this file.
|
namespace | yaze |
| Main namespace for the application.
|
|
namespace | yaze::test |
|
|
| yaze::test::MATCHER_P (StatusIs, status, "") |
|
template<typename T > |
::testing::AssertionResult | yaze::test::IsOkAndHolds (const absl::StatusOr< T > &status_or, const T &value) |
|
| yaze::test::MATCHER_P (IsOkAndHolds, value, "") |
|
| yaze::test::MATCHER_P (StatusIsWithMessage, message, "") |
|
| yaze::test::MATCHER_P (StatusIsWithCode, code, "") |
|
template<typename T , typename Matcher > |
::testing::AssertionResult | yaze::test::IsOkAndMatches (const absl::StatusOr< T > &status_or, const Matcher &matcher) |
|
template<typename T > |
::testing::AssertionResult | yaze::test::StatusOrEqual (const absl::StatusOr< T > &a, const absl::StatusOr< T > &b) |
|
◆ EXPECT_OK
#define EXPECT_OK |
( |
|
expr | ) |
EXPECT_EQ((expr), absl::OkStatus()) |
◆ ASSERT_OK
#define ASSERT_OK |
( |
|
expr | ) |
ASSERT_EQ((expr), absl::OkStatus()) |
◆ ASSERT_OK_AND_ASSIGN
#define ASSERT_OK_AND_ASSIGN |
( |
|
lhs, |
|
|
|
rexpr |
|
) |
| |
Value: if (auto rexpr_value = (rexpr); rexpr_value.ok()) { \
lhs = std::move(rexpr_value).value(); \
} else { \
FAIL() << "error: " << rexpr_value.status(); \
}
Definition at line 14 of file testing.h.