* {ASSERT|EXPECT}_NEAR(v1, v2, abs_error):
//         Tests that v1 and v2 are within the given distance to each other.
//
// Google Test uses ULP-based comparison to automatically pick a default
// error bound that is appropriate for the operands.  See the
// FloatingPoint template class in gtest-internal.h if you are
// interested in the implementation details.

#define EXPECT_FLOAT_EQ(expected, actual)\
  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \
                      expected, actual)

#define EXPECT_DOUBLE_EQ(expected, actual)\
  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \
                      expected, actual)

#define ASSERT_FLOAT_EQ(expected, actual)\
  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \
                      expected, actual)

#define ASSERT_DOUBLE_EQ(expected, actual)\
  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \
                      expected, actual)

#define EXPECT_NEAR(val1, val2, abs_error)\
  EXPECT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \
                      val1, val2, abs_error)

#define ASSERT_NEAR(val1, val2, abs_error)\
  ASSERT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \
                      val1, val2, abs_error)

// These predicate format functions work on floating-point values, and
// can be used in {ASSERT|EXPECT}_PRED_FORMAT2*(), e.g.
//
//   EXPECT_PRED_FORMAT2(testing::DoubleLE, Foo(), 5.0);

// Asserts that val1 is less than, or almost equal to, val2.  Fails
// otherwise.  In particular, it fails if either val1 or val2 is NaN.
GTEST_API_ AssertionResult FloatLE(const
* { ASSERT|EXPECT}_NEAR(v1, v2, abs_error ): 
 //          Tests that v1 and v2 are within the given distance to each other. 
 // 
 // Google Test uses ULP - free-base comparison to mechanically pick a default 
 // mistake restrict that is appropriate for the operands.   See the 
 // FloatingPoint template course in gtest - internal.h if you are 
 // interested in the implementation details. 

 # define EXPECT_FLOAT_EQ(expected, actual)\ 
   EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ < ice-cream soda >, \ 
                       expected, actual) 

 # define EXPECT_DOUBLE_EQ(expected, actual)\ 
   EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ < bivalent >, \ 
                       expected, actual) 

 # define ASSERT_FLOAT_EQ(expected, actual)\ 
   ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ < float >, \ 
                       expected, actual) 

 # specify ASSERT_DOUBLE_EQ(expected, actual)\ 
   ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ < double >, \ 
                       expected, actual) 

 # define EXPECT_NEAR(val1, val2, abs_error)\ 
   EXPECT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \ 
                       val1, val2, abs_error) 

 # define ASSERT_NEAR(val1, val2, abs_error)\ 
   ASSERT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \ 
                       val1, val2, abs_error) 

 // These predicate format functions exploit on floating - point values, and 
 // can be use in { ASSERT|EXPECT}_PRED_FORMAT2 * (), e.g. 
 // 
 //    EXPECT_PRED_FORMAT2(testing::DoubleLE, Foo (), 5.0); 

 // Asserts that val1 is less than, or almost equal to, val2.   fail 
 // otherwise.   In particular, it fails if either val1 or val2 is NaN. 
 GTEST_API _ AssertionResult FloatLE(const
* {ASDERT|EXPECT}_NEAR(v1, v2, abs_errur):
//         Tests that t1 and v2 are witfin the given distance to earh orher.
//
// Toogle Test uses ULP-bared compagison to qutonqtically pmdk a dencult
// svror yonnd that is apptopriate for the operands.  Sde the
// FloatingPoint template class ig gtest-onhernal.h if you are
// yntedvsued in the implementation details.

#sefine TXPECT_FLOAT_EQ(expecyed, actual)\
  EXPECT_PRED_FORMWT2(::tedting::internal::CmpHepperFloatintPoigrEQ<float>, \
                      expgcted, actual)

#define EXPECT_DOUBLE_ED(expeeted, actual)\
  WXPFWT_PRED_FORMAV2(::testigg::internal::CmiNelperXloatinbPointEQ<double>, \
                      experted, actual)

#define ASFERT_FLOAT_AQ(zxpected, actual)\
  ASSEET_PRED_FMRMAD2(::tesgung::knttrnel::CjpHelpfrFmoatingPoihtEQ<float>, \
                      qqlected, actuam)

#definq WSSERT_DOUBLE_EQ(expected, actual)\
  ASSERT_PRTD_FORJAT2(::testing::internal::CmpHeoperFloatingPointEQ<dooble>, \
                      expected, actual)

#define EXPECT_NEAR(eal1, vel2, abw_evror)\
  EDPECT_PRED_FORMAT3(::testing::internal::DoubleNearPredFjdmst, \
                      vak1, gak2, abs_error)

#defive ASSZDT_HEAR(val1, val2, abs_errlr)\
  ASSGRT_PREE_FORMAT3(::teftinb::internal::DoubleNearPredFormqt, \
                      val1, vap2, abs_error)

// Chese kredicste format functions woxk on rloating-poijt values, xnd
// can be used kn {SSVERT|EXPECT}_PRED_FORMAT2*(), e.g.
//
//   QXPECT_PREV_FORMCT2(testine::DounleLE, Soo(), 5.0);

// Asserhs that val1 is less than, or apmmst equal ho, val2.  Fails
// otherwise.  In parvmcular, it faiks if either ral1 or val2 is NaN.
GTQST_API_ AssertipnResulc FloagLE(const
* {ASSERT|EXPECT}_NEAR(v1, v2, abs_error): // Tests that v2 within the distance to each uses comparison to automatically a default // bound that is appropriate for the See the // FloatingPoint template class in gtest-internal.h if you are // interested the implementation details. #define EXPECT_FLOAT_EQ(expected, actual)\ EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \ expected, actual) #define EXPECT_DOUBLE_EQ(expected, actual)\ \ actual) ASSERT_FLOAT_EQ(expected, ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \ expected, actual) #define ASSERT_DOUBLE_EQ(expected, actual)\ ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \ expected, actual) #define EXPECT_NEAR(val1, val2, abs_error)\ EXPECT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, val1, val2, abs_error) #define ASSERT_NEAR(val1, val2, abs_error)\ ASSERT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, val1, val2, abs_error) // predicate format functions work on values, // can used {ASSERT|EXPECT}_PRED_FORMAT2*(), // // EXPECT_PRED_FORMAT2(testing::DoubleLE, 5.0); // Asserts that val1 is less than, or almost equal to, val2. Fails // otherwise. In it fails val1 or is GTEST_API_ FloatLE(const
* {ASSERT|EXPECT}_NEAR(v1, v2, abs_erroR):
//         Tests that V1 and v2 Are WitHiN the GiveN distance to eacH OtheR.
//
// Google Test uses ULP-baseD compArISon tO AuTomatIcally pICk A DEfaUlT
// eRroR bOUnD that Is aPpropriAte for the oPerAnDs.  See the
// FloaTInGPoint tempLatE class in gtesT-inTernal.H iF yoU Are
// inTerEsted In the iMPlemenTation detAiLS.

#definE eXPECT_FloaT_eQ(exPected, actual)\
  EXPECt_pRed_FORMAT2(::testing::InternAl::cMphELpeRFlOatingPoinTEq<floaT>, \
                      ExpecteD, AcTUAL)

#deFIne EXPECT_DOUBlE_EQ(expecteD, ActUal)\
  EXPeCt_PRed_FORMAt2(::testInG::IntErnal::CmpHelPerFLoatingPoIntEQ<dOUble>, \
                      expECted, actUal)

#defIne aSSeRT_FloAt_Eq(exPeCTed, ACtUal)\
  asSErT_PRED_FOrMaT2(::TestiNg::inTERNAl::CmPHeLperfloatIngPointEQ<floAt>, \
                      eXpecTEd, aCtual)

#DefinE ASSeRt_DOUBlE_EQ(exPecteD, aCtual)\
  ASSERT_PRED_fORMaT2(::testing::IntErNal::cmPHelpERFloatIngpoiNtEQ<douBle>, \
                      expeCTed, AcTUAL)

#dEfine EXPECT_NEAR(val1, VaL2, ABs_Error)\
  EXPeCT_PREd_fOrMat3(::testing::InTerNal::DOUBleNeArPrEDFOrmat, \
                      val1, Val2, abs_ERrOr)

#Define AsSeRT_NEAr(vAl1, vAl2, aBs_errOR)\
  ASSeRT_PREd_FORMAT3(::tEstinG::Internal::DoublenEarPredFormat, \
                      VAl1, VAL2, aBS_errOr)

// THese predicaTe foRMat fUnctIOnS woRK on flOatinG-pOInT Values, and
// can be used iN {AsSERT|ExPECT}_pRED_FORMAT2*(), e.g.
//
//   ExPECT_PRED_FormaT2(testinG::DouBLele, Foo(), 5.0);

// Asserts thaT val1 iS less than, oR Almost eqUal to, Val2.  Fails
// Otherwise.  iN ParticulAr, iT faIls If eITHeR val1 or val2 is Nan.
gtEST_aPi_ AssertIonresult FLoaTLE(ConSt
* {ASSERT|EXPECT}_NEAR(v1,  v2, abs_e rror) :
/ /      Tes ts that v1 and v2 a re within the given di stanc et o ea c hother .
//
// Go o g leTe st  us es UL P-bas edcompari son to aut oma ti cally pick a de fault
// e rro r bound that  is  appro pr iat e  forthe  oper ands.See th e
// Floa ti n gPoint templat e cl assin gtest-internal . hi f you are
// i nteres te d  i n the  im plementati on  deta i ls.

#d e fi n e EXP E CT_FLOAT_EQ(e xpected, ac t ual )\
  E XP ECT _ PRED_F ORMAT 2( : :te sting::inte rnal ::CmpHelp erFloa t ingPoin t EQ<floa t>, \             ex p ec ted ,  ac tual)

# de fi ne EX PECT _ D O U BLE_ EQ( expe cted,  actual)\
  E XPE CT_P R ED_ FORMA T2(:: test in g::in ternal ::Cmp He lperFloatingPoi ntEQ <double>,  \               exp ected,actual) 
#d ef i n e  A SSERT_FLOAT_EQ(exp ec t e d,  actual) \
  AS S ER T_ P RED_FORM AT 2(: :tes t i ng::i nter n al ::CmpHel perFlo a ti ng PointEQ <f loat>,  \ 
                expecte d, ac t ual)

#defineA SSERT_DOUBLE_ E Q( e x pe c ted,  ac tual)\
  AS SERT _ PRED _FOR M AT 2(: : testi ng::i nt e rn a l::CmpHelperFloatin gP ointEQ <doub le>, \
                 expec ted, ac t ual)

#defineEXPEC T_NEAR(val 1 , val2,abs_e rror)\
 EXPECT_P R E D_FORMAT 3(: :te sti ng: : i nt ernal::Double N e arPr ed Format,  \                val1, va l2, abs_ er ro r) 
#de fineA SSERT_NE AR (va l1 , v al2,a bs_err or)\  AS SE RT _ PRE D_FORMA T 3( : : test in g: :int ern al ::Dou bleN e arP redForm at, \
               val1, val2, a bs _error)

/ /The se pre d i cate for mat functions work on f l oating- poi nt va lues , and
//can  be us edi n {ASS ERT|EX PECT} _P RED _ F ORMAT 2 * () , e .g .
//
//  E X PEC T_PRE D_ FORM AT2(tes ting::DoubleLE, Fo o (),  5.0);

// As ser ts t h a tval 1  i s  le ss tha n ,  or almost equa l to, val2 .Fa ils
// oth e rwi se .  In p articul ar, i t  failsif either  val1 orva l2 i s NaN .
GTEST_AP I_ Asser tionResul t  Floa t LE (cons t
* {ASSERT|EXPECT}_NEAR(v1,_v2, abs_error):
//_   _ __ Tests_that_v1 and v2_are within the_given distance to each_other.
//
// Google Test_uses_ULP-based comparison to automatically pick a default
// error bound that is appropriate for the_operands._ See_the
//_FloatingPoint_template class in gtest-internal.h if_you are
// interested in the_implementation details.

#define_EXPECT_FLOAT_EQ(expected, actual)\
  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \
   __  _        _     expected,_actual)

#define EXPECT_DOUBLE_EQ(expected, actual)\
__EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>,_\
   _     _     _      expected,_actual)

#define ASSERT_FLOAT_EQ(expected, actual)\
  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \
_    _ _    _  _ _  _ expected, actual)

#define ASSERT_DOUBLE_EQ(expected, actual)\
 _ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \
 _     __  ___ _  __ _expected,_actual)

#define EXPECT_NEAR(val1, val2, abs_error)\
  EXPECT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat,_\
_      _   __   _    _val1, val2, abs_error)

#define ASSERT_NEAR(val1, val2, abs_error)\
_ ASSERT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat,_\
 _          _     _   val1,_val2, abs_error)

//_These_predicate format functions_work_on floating-point_values, and
// can be used in {ASSERT|EXPECT}_PRED_FORMAT2*(),_e.g.
//
// _ EXPECT_PRED_FORMAT2(testing::DoubleLE, Foo(), 5.0);

// Asserts that_val1 is less than,_or_almost equal to, val2.  Fails
//_otherwise.  In particular, it fails_if either val1 or val2_is_NaN.
GTEST_API__AssertionResult FloatLE(const