template <typename FloatType>

class FloatingEqMatcher

Defined at line 1712 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h

Implements the polymorphic floating point equality matcher, which matches

two float values using ULP-based approximation or, optionally, a

user-specified epsilon. The template is meant to be instantiated with

FloatType being either float or double.

Public Methods

void FloatingEqMatcher<FloatType> (FloatType expected, bool nan_eq_nan)

Constructor for FloatingEqMatcher.

The matcher's input will be compared with expected. The matcher treats two

NANs as equal if nan_eq_nan is true. Otherwise, under IEEE standards,

equality comparisons between NANs will always return false. We specify a

negative max_abs_error_ term to indicate that ULP-based approximation will

be used for comparison.

Defined at line 1720 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h

void FloatingEqMatcher<FloatType> (FloatType expected, bool nan_eq_nan, FloatType max_abs_error)

Constructor that supports a user-specified max_abs_error that will be used

for comparison instead of ULP-based approximation. The max absolute

should be non-negative.

Defined at line 1726 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h

Matcher<FloatType> operator testing::Matcher<type-parameter-0-0> ()

The following 3 type conversion operators allow FloatEq(expected) and

NanSensitiveFloatEq(expected) to be used as a Matcher

<float

>, a

Matcher

<const

float

&

>, or a Matcher

<float

&

>, but nothing else.

Defined at line 1832 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h

Matcher<const FloatType &> operator testing::Matcher<const type-parameter-0-0 &> ()

Defined at line 1837 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h

Matcher<FloatType &> operator testing::Matcher<type-parameter-0-0 &> ()

Defined at line 1842 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h

Records