Skip to content

Namespace ae108::cppptest

Namespace List > ae108 > cppptest

Testing helpers. More...

Public Functions

Type Name
MATCHER (ScalarEq, "value "+std::string(negation ? "not " :"")+"equal to reference")
Check that the value has almost the same values as reference.
MATCHER_P (AddressEq, reference, "address "+ std::string)
Check that the value has the given address.
MATCHER_P (ScalarEq, reference, "value "+ std::string)
Check that the value has almost the same values as reference.
MATCHER_P2 (ScalarEqIfLocal, row, reference, std::string(negation ? "not " :"")+"equal to "+::testing::PrintToString(reference)+" at ("+::testing::PrintToString(row)+")")
Check that the value at index row is almost equal to reference (if it is available locally).
MATCHER_P2 (ScalarNear, reference, tolerance, "value "+ std::string)
Check that the value has almost the same values as reference.
MATCHER_P3 (ScalarEqIfLocal, row, col, reference, std::string(negation ? "not " :"")+"equal to "+::testing::PrintToString(reference)+" at ("+::testing::PrintToString(row)+", "+::testing::PrintToString(col)+")")
Check that the value at index (row, col) is almost equal to reference (if it is available locally).
MATCHER_P3 (ScalarNearIfLocal, row, reference, tolerance, std::string(negation ? "not " :"")+"equal to "+::testing::PrintToString(reference)+" at ("+::testing::PrintToString(row)+")")
Check that the value at index row is almost equal to reference (if it is available locally).
MATCHER_P4 (ScalarNearIfLocal, row, col, reference, tolerance, std::string(negation ? "not " :"")+"equal to "+::testing::PrintToString(reference)+" at ("+::testing::PrintToString(row)+", "+::testing::PrintToString(col)+")")
Check that the value at index (row, col) is almost equal to reference (if it is available locally).
bool almost_equal_to_reference (const double value, const double reference, ::testing::MatchResultListener *const stream) noexcept
Returns true if and only if value is approximately equal to the reference.
bool almost_equal_to_reference (const std::complex< double > & value, const std::complex< double > & reference, ::testing::MatchResultListener *const stream) noexcept
Returns true if and only if value is approximately equal to the reference.
bool isLocal (const T & t, typename T::size_type index)
Returns true if and only if the index is owned locally (as determined by localRowRange()).
bool near_to_reference (const double value, const double reference, const double tolerance, ::testing::MatchResultListener *const stream) noexcept
Returns true if and only if value is approximately equal to the reference.
bool near_to_reference (const std::complex< double > & value, const std::complex< double > & reference, const double tolerance, ::testing::MatchResultListener *const stream) noexcept
Returns true if and only if value is approximately equal to the reference.

Detailed Description

Library containing gtest matchers and other testing utilities.

Public Functions Documentation

function MATCHER

Check that the value has almost the same values as reference.

ae108::cppptest::MATCHER (
    ScalarEq,
    "value "+std::string(negation ? "not " :"")+"equal to reference"
) 


function MATCHER_P

Check that the value has the given address.

ae108::cppptest::MATCHER_P (
    AddressEq,
    reference,
    "address "+ std::string
) 


function MATCHER_P

Check that the value has almost the same values as reference.

ae108::cppptest::MATCHER_P (
    ScalarEq,
    reference,
    "value "+ std::string
) 


function MATCHER_P2

Check that the value at index row is almost equal to reference (if it is available locally).

ae108::cppptest::MATCHER_P2 (
    ScalarEqIfLocal,
    row,
    reference,
    std::string(negation ? "not " :"")+"equal to "+::testing::PrintToString(reference)+" at ("+::testing::PrintToString(row)+")"
) 


function MATCHER_P2

Check that the value has almost the same values as reference.

ae108::cppptest::MATCHER_P2 (
    ScalarNear,
    reference,
    tolerance,
    "value "+ std::string
) 


function MATCHER_P3

Check that the value at index (row, col) is almost equal to reference (if it is available locally).

ae108::cppptest::MATCHER_P3 (
    ScalarEqIfLocal,
    row,
    col,
    reference,
    std::string(negation ? "not " :"")+"equal to "+::testing::PrintToString(reference)+" at ("+::testing::PrintToString(row)+", "+::testing::PrintToString(col)+")"
) 


function MATCHER_P3

Check that the value at index row is almost equal to reference (if it is available locally).

ae108::cppptest::MATCHER_P3 (
    ScalarNearIfLocal,
    row,
    reference,
    tolerance,
    std::string(negation ? "not " :"")+"equal to "+::testing::PrintToString(reference)+" at ("+::testing::PrintToString(row)+")"
) 


function MATCHER_P4

Check that the value at index (row, col) is almost equal to reference (if it is available locally).

ae108::cppptest::MATCHER_P4 (
    ScalarNearIfLocal,
    row,
    col,
    reference,
    tolerance,
    std::string(negation ? "not " :"")+"equal to "+::testing::PrintToString(reference)+" at ("+::testing::PrintToString(row)+", "+::testing::PrintToString(col)+")"
) 


function almost_equal_to_reference

Returns true if and only if value is approximately equal to the reference.

inline bool ae108::cppptest::almost_equal_to_reference (
    const double value,
    const double reference,
    ::testing::MatchResultListener *const stream
) noexcept


function almost_equal_to_reference

Returns true if and only if value is approximately equal to the reference.

inline bool ae108::cppptest::almost_equal_to_reference (
    const std::complex< double > & value,
    const std::complex< double > & reference,
    ::testing::MatchResultListener *const stream
) noexcept


function isLocal

Returns true if and only if the index is owned locally (as determined by localRowRange()).

template<class T>
bool ae108::cppptest::isLocal (
    const T & t,
    typename T::size_type index
) 


function near_to_reference

Returns true if and only if value is approximately equal to the reference.

inline bool ae108::cppptest::near_to_reference (
    const double value,
    const double reference,
    const double tolerance,
    ::testing::MatchResultListener *const stream
) noexcept


function near_to_reference

Returns true if and only if value is approximately equal to the reference.

inline bool ae108::cppptest::near_to_reference (
    const std::complex< double > & value,
    const std::complex< double > & reference,
    const double tolerance,
    ::testing::MatchResultListener *const stream
) noexcept



The documentation for this class was generated from the following file cppptest/src/include/ae108/cppptest/isLocal.h