#include <gmock-matchers.h>
template<typename FloatType>
template<typename T>
class testing::internal::FloatingEqMatcher< FloatType >::Impl< T >
Definition at line 1914 of file gmock-matchers.h.
◆ Impl()
template<typename FloatType>
template<typename T >
Definition at line 1916 of file gmock-matchers.h.
1917 : expected_(expected),
1918 nan_eq_nan_(nan_eq_nan),
1919 max_abs_error_(max_abs_error) {}
◆ DescribeNegationTo()
template<typename FloatType>
template<typename T >
Reimplemented from testing::MatcherDescriberInterface.
Definition at line 1977 of file gmock-matchers.h.
1979 const ::std::streamsize old_precision = os->precision(
1980 ::std::numeric_limits<FloatType>::digits10 + 2);
1981 if (FloatingPoint<FloatType>(expected_).is_nan()) {
1985 *os <<
"is anything";
1988 *os <<
"isn't approximately " << expected_;
1989 if (HasMaxAbsError()) {
1990 *os <<
" (absolute error > " << max_abs_error_ <<
")";
1994 os->precision(old_precision);
◆ DescribeTo()
template<typename FloatType>
template<typename T >
Implements testing::MatcherDescriberInterface.
Definition at line 1956 of file gmock-matchers.h.
1960 const ::std::streamsize old_precision = os->precision(
1961 ::std::numeric_limits<FloatType>::digits10 + 2);
1962 if (FloatingPoint<FloatType>(expected_).is_nan()) {
1966 *os <<
"never matches";
1969 *os <<
"is approximately " << expected_;
1970 if (HasMaxAbsError()) {
1971 *os <<
" (absolute error <= " << max_abs_error_ <<
")";
1974 os->precision(old_precision);
◆ MatchAndExplain()
template<typename FloatType>
template<typename T >
Implements testing::MatcherInterface< T >.
Definition at line 1921 of file gmock-matchers.h.
1923 const FloatingPoint<FloatType> actual(
value), expected(expected_);
1926 if (actual.is_nan() || expected.is_nan()) {
1927 if (actual.is_nan() && expected.is_nan()) {
1933 if (HasMaxAbsError()) {
1938 if (
value == expected_) {
1942 const FloatType diff =
value - expected_;
1943 if (fabs(diff) <= max_abs_error_) {
1947 if (listener->IsInterested()) {
1948 *listener <<
"which is " << diff <<
" from " << expected_;
1952 return actual.AlmostEquals(expected);
const GenericPointer< typename T::ValueType > T2 value
The documentation for this class was generated from the following file:
- /home/abuild/rpmbuild/BUILD/electroneum-5.0.0.4/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h