ALPSCore reference
Classes | Functions
alps::testing Namespace Reference

Classes

struct  is_scalar
 
struct  is_scalar< double >
 
struct  is_scalar< float >
 
struct  is_scalar< long double >
 
struct  is_scalar< std::complex< T > >
 
class  unique_file
 Resource manager: manages a file with unique name. More...
 

Functions

template<typename T >
bool is_near (const T a, const T b, const T eps)
 Compares two floating point values, see http://floating-point-gui.de/errors/comparison/. More...
 
template<typename T >
bool is_near (const T a, const T b)
 Compares two floating point values, see http://floating-point-gui.de/errors/comparison/. More...
 
template<typename T , typename std::enable_if< is_scalar< T >::value, int >::type = 0>
::testing::AssertionResult NearPredFormat (const char *expr1, const char *expr2, const char *abs_error_expr, const T &val1, const T &val2, double abs_error)
 
template<typename Derived1 , typename Derived2 >
::testing::AssertionResult NearPredFormat (const char *expr1, const char *expr2, const char *abs_error_expr, const Eigen::MatrixBase< Derived1 > &val1, const Eigen::MatrixBase< Derived2 > &val2, double abs_error)
 
std::string temporary_filename (const std::string &prefix)
 Convenience function: creates unique named file, returns its name. More...
 

Function Documentation

template<typename T >
bool alps::testing::is_near ( const T  a,
const T  b,
const T  eps 
)
inline

Compares two floating point values, see http://floating-point-gui.de/errors/comparison/.

Definition at line 46 of file fp_compare.hpp.

template<typename T >
bool alps::testing::is_near ( const T  a,
const T  b 
)
inline

Compares two floating point values, see http://floating-point-gui.de/errors/comparison/.

Definition at line 65 of file fp_compare.hpp.

template<typename T , typename std::enable_if< is_scalar< T >::value, int >::type = 0>
::testing::AssertionResult alps::testing::NearPredFormat ( const char *  expr1,
const char *  expr2,
const char *  abs_error_expr,
const T &  val1,
const T &  val2,
double  abs_error 
)

Helper function for implementing ALPS_EXPECT_NEAR.

Definition at line 28 of file near.hpp.

template<typename Derived1 , typename Derived2 >
::testing::AssertionResult alps::testing::NearPredFormat ( const char *  expr1,
const char *  expr2,
const char *  abs_error_expr,
const Eigen::MatrixBase< Derived1 > &  val1,
const Eigen::MatrixBase< Derived2 > &  val2,
double  abs_error 
)

Helper function for implementing ALPS_EXPECT_NEAR.

Definition at line 48 of file near.hpp.

std::string alps::testing::temporary_filename ( const std::string &  prefix)
inline

Convenience function: creates unique named file, returns its name.

Definition at line 46 of file unique_file.hpp.