ITK  5.4.0
Insight Toolkit
itk::GTest::Predicate Namespace Reference


template<typename T1 , typename T2 >
inline ::testing::AssertionResult VectorDoubleRMSPredFormat (const char *expr1, const char *expr2, const char *rmsErrorExpr, const T1 &val1, const T2 &val2, double rmsError)

Detailed Description

The Predicate namespace contains functions used to implement custom GTest Predicate-Formatters.

Function Documentation

◆ VectorDoubleRMSPredFormat()

template<typename T1 , typename T2 >
inline ::testing::AssertionResult itk::GTest::Predicate::VectorDoubleRMSPredFormat ( const char *  expr1,
const char *  expr2,
const char *  rmsErrorExpr,
const T1 &  val1,
const T2 &  val2,
double  rmsError 

Implements GTest Predicate Formatter for ITK_EXPECT_VECTOR_NEAR macro. This macro and formatter work with any combination of ITK array-like objects which are supported by itk::NumericTraits. The arrays must be the same length, and the root mean squares error is used to check if the arrays are "near" each other.

Definition at line 58 of file itkGTestPredicate.h.

References itk::NumericTraits< T >::GetLength().