yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
testing.h File Reference
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "absl/status/status.h"
#include "absl/status/statusor.h"
Include dependency graph for testing.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  yaze
 
namespace  yaze::test
 

Macros

#define EXPECT_OK(expr)
 
#define ASSERT_OK(expr)
 
#define ASSERT_OK_AND_ASSIGN(lhs, rexpr)
 

Functions

 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, "")
 

Macro Definition Documentation

◆ EXPECT_OK

◆ ASSERT_OK

#define ASSERT_OK ( expr)
Value:
ASSERT_EQ((expr), absl::OkStatus())

Definition at line 12 of file testing.h.

◆ 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.

Referenced by yaze::test::TEST_F(), yaze::test::TEST_F(), yaze::test::TEST_F(), yaze::test::TEST_F(), and yaze::test::TEST_F().