#include <assert.h>
#include <errno.h>
#include <sstream>
#include <string>
#include <type_traits>
#include "android-base/errors.h"
#include "android-base/expected.h"
#include "android-base/format.h"
Go to the source code of this file.
|
| template<typename E > |
| bool | android::base::operator== (const ResultError< E > &lhs, const ResultError< E > &rhs) |
| |
| template<typename E > |
| bool | android::base::operator!= (const ResultError< E > &lhs, const ResultError< E > &rhs) |
| |
| template<typename E > |
| std::ostream & | android::base::operator<< (std::ostream &os, const ResultError< E > &t) |
| |
| Error< Errno > | android::base::ErrnoError () |
| |
| template<typename E > |
| E | android::base::ErrorCode (E code) |
| |
| template<typename T , typename E , typename... Args> |
| E | android::base::ErrorCode (E code, T &&t, const Args &... args) |
| |
| template<typename T , typename... Args> |
| Error< Errno > | android::base::ErrorfImpl (const T &&fmt, const Args &... args) |
| |
| template<typename T , typename... Args> |
| Error< Errno > | android::base::ErrnoErrorfImpl (const T &&fmt, const Args &... args) |
| |
◆ ASSERT_RESULT_OK
| #define ASSERT_RESULT_OK |
( |
|
stmt | ) |
|
Value: if (const auto& tmp = (stmt); !tmp.ok()) \
FAIL() << "Value of: " << #stmt << "\n" \
<< " Actual: " << tmp.error().message() << "\n" \
<< "Expected: is ok\n"
◆ ErrnoErrorf
◆ Errorf
◆ EXPECT_RESULT_OK
| #define EXPECT_RESULT_OK |
( |
|
stmt | ) |
|
Value: if (const auto& tmp = (stmt); !tmp.ok()) \
ADD_FAILURE() << "Value of: " << #stmt << "\n" \
<< " Actual: " << tmp.error().message() << "\n" \
<< "Expected: is ok\n"
◆ SPECIALIZED_CONVERSION
| #define SPECIALIZED_CONVERSION |
( |
|
type | ) |
|
Value: operator const expected<type, ErrorType<T>>() const &&\
unexpected(E) -> unexpected< E >