Bitcoin Core  24.99.0
P2P Digital Currency
Classes | Functions
result_tests.cpp File Reference
#include <util/result.h>
#include <boost/test/unit_test.hpp>
Include dependency graph for result_tests.cpp:

Go to the source code of this file.

Classes

struct  NoCopy
 

Functions

bool operator== (const bilingual_str &a, const bilingual_str &b)
 
std::ostream & operator<< (std::ostream &os, const bilingual_str &s)
 
bool operator== (const NoCopy &a, const NoCopy &b)
 
std::ostream & operator<< (std::ostream &os, const NoCopy &o)
 
util::Result< int > IntFn (int i, bool success)
 
util::Result< bilingual_strStrFn (bilingual_str s, bool success)
 
util::Result< NoCopyNoCopyFn (int i, bool success)
 
template<typename T >
void ExpectResult (const util::Result< T > &result, bool success, const bilingual_str &str)
 
template<typename T , typename... Args>
void ExpectSuccess (const util::Result< T > &result, const bilingual_str &str, Args &&... args)
 
template<typename T , typename... Args>
void ExpectFail (const util::Result< T > &result, const bilingual_str &str)
 
 BOOST_AUTO_TEST_CASE (check_returned)
 
 BOOST_AUTO_TEST_CASE (check_value_or)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( check_returned  )

Definition at line 76 of file result_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( check_value_or  )

Definition at line 86 of file result_tests.cpp.

Here is the call graph for this function:

◆ ExpectFail()

template<typename T , typename... Args>
void ExpectFail ( const util::Result< T > &  result,
const bilingual_str str 
)

Definition at line 71 of file result_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ExpectResult()

template<typename T >
void ExpectResult ( const util::Result< T > &  result,
bool  success,
const bilingual_str str 
)

Definition at line 55 of file result_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ExpectSuccess()

template<typename T , typename... Args>
void ExpectSuccess ( const util::Result< T > &  result,
const bilingual_str str,
Args &&...  args 
)

Definition at line 62 of file result_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IntFn()

util::Result<int> IntFn ( int  i,
bool  success 
)

Definition at line 36 of file result_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NoCopyFn()

util::Result<NoCopy> NoCopyFn ( int  i,
bool  success 
)

Definition at line 48 of file result_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator<<() [1/2]

std::ostream& operator<< ( std::ostream &  os,
const bilingual_str s 
)
inline

Definition at line 14 of file result_tests.cpp.

◆ operator<<() [2/2]

std::ostream& operator<< ( std::ostream &  os,
const NoCopy o 
)

Definition at line 31 of file result_tests.cpp.

◆ operator==() [1/2]

bool operator== ( const bilingual_str a,
const bilingual_str b 
)
inline

Definition at line 9 of file result_tests.cpp.

◆ operator==() [2/2]

bool operator== ( const NoCopy a,
const NoCopy b 
)

Definition at line 26 of file result_tests.cpp.

◆ StrFn()

util::Result<bilingual_str> StrFn ( bilingual_str  s,
bool  success 
)

Definition at line 42 of file result_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: