10#ifndef THYRA_TESTING_TOOLS_DECL_HPP 
   11#define THYRA_TESTING_TOOLS_DECL_HPP 
   13#include "Thyra_OperatorVectorTypes.hpp" 
   14#include "Teuchos_VerbosityLevel.hpp" 
   15#include "Teuchos_TestingHelpers.hpp" 
   24inline const std::string 
passfail(
const bool result)
 
 
   34template <
class Scalar>
 
   37relErr( 
const Scalar &s1, 
const Scalar &s2 )
 
 
   49template <
class Scalar>
 
   51relVectorErr( 
const VectorBase<Scalar> &v1, 
const VectorBase<Scalar> &v2 );
 
   64template<
class Scalar1, 
class Scalar2, 
class ScalarMag>
 
   66  const std::string &v1_name,
 
   67  const ArrayView<const Scalar1> &v1,
 
   68  const std::string &v2_name,
 
   69  const ArrayView<const Scalar2> &v2,
 
   70  const std::string &maxRelErr_error_name,
 
   71  const ScalarMag &maxRelErr_error,
 
   72  const std::string &maxRelErr_warning_name,
 
   73  const ScalarMag &maxRelErr_warning,
 
   74  const Ptr<std::ostream> &out,
 
   75  const std::string &leadingIndent = std::string(
"")
 
   91  const std::string &v1_name,
 
   92  const VectorBase<Scalar> &v1,
 
   93  const std::string &v2_name,
 
   94  const VectorBase<Scalar> &v2,
 
   95  const std::string &maxRelErr_error_name,
 
   97  const std::string &maxRelErr_warning_name,
 
  101  const std::string &leadingIndent = std::string(
"")
 
  111template<
class Scalar>
 
  113  const std::string &error_name,
 
  115  const std::string &max_error_name,
 
  117  const std::string &max_warning_name,
 
  120  const std::string &leadingIndent = std::string(
"")
 
  132template<
class Scalar>
 
  134  const std::string &error_name,
 
  136  const std::string &max_error_name,
 
  138  const std::string &max_warning_name,
 
  140  const Ptr<std::ostream> &out,
 
  141  const std::string &leadingIndent = std::string(
"")
 
  152  const std::string &boolExprName,
 
  153  const bool &boolExpr,
 
  154  const bool &boolExpected,
 
  155  const Ptr<std::ostream> &out,
 
  156  const std::string &leadingIndent = std::string(
"")
 
  184void printTestResults(
 
  186  const std::string &test_summary,
 
  187  const bool show_all_tests,
 
  188  const Ptr<bool> &success,
 
  189  const Ptr<std::ostream> &out
 
  223  bool show_all_tests_;
 
  224  std::ostringstream ossStore_;
 
  226  bool printedTestResults_;
 
 
  239template<
class Scalar>
 
  250template<
class Scalar>
 
Base class for all linear operators.
 
Control printing of test results.
 
RCP< FancyOStream > getTestOStream()
Return the stream used for testing.
 
~TestResultsPrinter()
Print the test results on destruction if not already printed.
 
RCP< FancyOStream > replaceOStream(const RCP< FancyOStream > &out)
Replace the underlying output stream (used for unit testing this class).
 
void printTestResults(const bool this_result, const Ptr< bool > &success)
Print the test result.
 
Abstract interface for finite-dimensional dense vectors.
 
Teuchos::ScalarTraits< Scalar >::magnitudeType relVectorErr(const VectorBase< Scalar > &v1, const VectorBase< Scalar > &v2)
Return relative error of two vectors.
 
bool testRelErrors(const std::string &v1_name, const ArrayView< const Scalar1 > &v1, const std::string &v2_name, const ArrayView< const Scalar2 > &v2, const std::string &maxRelErr_error_name, const ScalarMag &maxRelErr_error, const std::string &maxRelErr_warning_name, const ScalarMag &maxRelErr_warning, const Ptr< std::ostream > &out, const std::string &leadingIndent=std::string(""))
Compute, check and optionally print the relative errors in two scalar arays.
 
Teuchos::ScalarTraits< Scalar >::magnitudeType relErr(const Scalar &s1, const Scalar &s2)
 
const std::string passfail(const bool result)
 
bool testBoolExpr(const std::string &boolExprName, const bool &boolExpr, const bool &boolExpected, const Ptr< std::ostream > &out, const std::string &leadingIndent=std::string(""))
Check a boolean result against expected result.
 
bool testMaxErrors(const std::string &error_name, const ArrayView< const typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &errors, const std::string &max_error_name, const typename Teuchos::ScalarTraits< Scalar >::magnitudeType &max_error, const std::string &max_warning_name, const typename Teuchos::ScalarTraits< Scalar >::magnitudeType &max_warning, const Ptr< std::ostream > &out, const std::string &leadingIndent=std::string(""))
Check that an array of errors is less than some error tolerence.
 
bool testRelNormDiffErr(const std::string &v1_name, const VectorBase< Scalar > &v1, const std::string &v2_name, const VectorBase< Scalar > &v2, const std::string &maxRelErr_error_name, const typename Teuchos::ScalarTraits< Scalar >::magnitudeType &maxRelErr_error, const std::string &maxRelErr_warning_name, const typename Teuchos::ScalarTraits< Scalar >::magnitudeType &maxRelErr_warning, std::ostream *out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::VERB_LOW, const std::string &leadingIndent=std::string(""))
Compute, check and optionally print the relative errors in two vectors.
 
bool testMaxErr(const std::string &error_name, const Scalar &error, const std::string &max_error_name, const typename Teuchos::ScalarTraits< Scalar >::magnitudeType &max_error, const std::string &max_warning_name, const typename Teuchos::ScalarTraits< Scalar >::magnitudeType &max_warning, std::ostream *out, const std::string &leadingIndent=std::string(""))
Check that an error is less than some error tolerence.
 
T_To & dyn_cast(T_From &from)
 
const std::string passfail(const bool result)