@@ -712,7 +712,7 @@ void CreditDefaultSwapTest::testIsdaEngine() {
712712 .withSide (Protection::Buyer)
713713 .withPricingEngine (engine);
714714
715- BOOST_CHECK_SMALL (conventionalTradeBuy->NPV (), tolerance);
715+ QL_CHECK_SMALL (conventionalTradeBuy->NPV (), tolerance);
716716
717717 ext::shared_ptr<CreditDefaultSwap> conventionalTradeSell =
718718 MakeCreditDefaultSwap (termDate, 0.01 )
@@ -721,7 +721,7 @@ void CreditDefaultSwapTest::testIsdaEngine() {
721721 .withSide (Protection::Seller)
722722 .withPricingEngine (engine);
723723
724- BOOST_CHECK_SMALL (conventionalTradeSell->NPV (), tolerance);
724+ QL_CHECK_SMALL (conventionalTradeSell->NPV (), tolerance);
725725
726726 l++;
727727 }
@@ -848,24 +848,25 @@ void CreditDefaultSwapTest::testIsdaCalculatorReconcileSingleQuote ()
848848 .withPricingEngine (engine);
849849
850850
851- double npv = conventionalTrade->NPV ();
852- double calculated_upfront = conventionalTrade->notional () * conventionalTrade->fairUpfront ();
853- double df = calculated_upfront / npv; // to take into account of the discount to cash settlement
854- double derived_accrual = df * (npv -
851+ Real npv = conventionalTrade->NPV ();
852+ Real calculated_upfront = conventionalTrade->notional () * conventionalTrade->fairUpfront ();
853+ Real df = calculated_upfront / npv; // to take into account of the discount to cash settlement
854+ Real derived_accrual =
855+ df * (npv -
855856 conventionalTrade->defaultLegNPV () -
856857 conventionalTrade->couponLegNPV ());
857858
858- double calculated_accrual = conventionalTrade->accrualRebate ()->amount ();
859+ Real calculated_accrual = conventionalTrade->accrualRebate ()->amount ();
859860
860861 auto settlement_date = conventionalTrade->accrualRebate ()->date ();
861862
862- BOOST_CHECK_CLOSE (npv, markitValue, tolerance);
863+ QL_CHECK_CLOSE (npv, markitValue, tolerance);
863864
864- BOOST_CHECK_CLOSE (calculated_upfront, df* markitValue, tolerance);
865+ QL_CHECK_CLOSE (calculated_upfront, df * markitValue, tolerance);
865866
866- BOOST_CHECK_CLOSE (derived_accrual, expected_accrual, tolerance);
867+ QL_CHECK_CLOSE (derived_accrual, expected_accrual, tolerance);
867868
868- BOOST_CHECK_CLOSE (calculated_accrual, expected_accrual, tolerance);
869+ QL_CHECK_CLOSE (calculated_accrual, expected_accrual, tolerance);
869870
870871 BOOST_CHECK_EQUAL (settlement_date, WeekendsOnly ().advance (tradeDate,3 , TimeUnit::Days));
871872
@@ -962,14 +963,14 @@ void CreditDefaultSwapTest::testIsdaCalculatorReconcileSingleWithIssueDateInTheP
962963 .withTradeDate (tradeDate);
963964
964965
965- double npv = conventionalTrade->NPV ();
966- double calculated_accrual = npv -
966+ Real npv = conventionalTrade->NPV ();
967+ Real calculated_accrual = npv -
967968 conventionalTrade->defaultLegNPV () -
968969 conventionalTrade->couponLegNPV ();
969970
970- BOOST_CHECK_CLOSE (npv, markitValue, tolerance);
971+ QL_CHECK_CLOSE (npv, markitValue, tolerance);
971972
972- BOOST_CHECK_CLOSE (calculated_accrual, expected_accrual, tolerance);
973+ QL_CHECK_CLOSE (calculated_accrual, expected_accrual, tolerance);
973974}
974975
975976test_suite* CreditDefaultSwapTest::suite () {
0 commit comments