Skip to content

Commit

Permalink
Replace boost:: with ext::
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio committed Aug 8, 2020
1 parent d6cf4b9 commit a081649
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test-suite/cashflows.cpp
Expand Up @@ -282,17 +282,17 @@ void CashFlowsTest::testExCouponDates() {
// no ex-coupon dates
Leg l1 = FixedRateLeg(schedule).withNotionals(100.0).withCouponRates(0.03, Actual360());
for (Size i = 0; i < l1.size(); ++i) {
boost::shared_ptr<Coupon> c = boost::dynamic_pointer_cast<Coupon>(l1[i]);
ext::shared_ptr<Coupon> c = ext::dynamic_pointer_cast<Coupon>(l1[i]);
if (c->exCouponDate() != Date()) {
BOOST_ERROR("ex-coupon date found (none expected)");
}
}

// same for floating legs
boost::shared_ptr<IborIndex> index(new Euribor3M);
ext::shared_ptr<IborIndex> index(new Euribor3M);
Leg l2 = IborLeg(schedule, index).withNotionals(100.0);
for (Size i = 0; i < l2.size(); ++i) {
boost::shared_ptr<Coupon> c = boost::dynamic_pointer_cast<Coupon>(l2[i]);
ext::shared_ptr<Coupon> c = ext::dynamic_pointer_cast<Coupon>(l2[i]);
if (c->exCouponDate() != Date()) {
BOOST_ERROR("ex-coupon date found (none expected)");
}
Expand All @@ -304,7 +304,7 @@ void CashFlowsTest::testExCouponDates() {
.withCouponRates(0.03, Actual360())
.withExCouponPeriod(Period(2, Days), NullCalendar(), Unadjusted, false);
for (Size i = 0; i < l5.size(); ++i) {
boost::shared_ptr<Coupon> c = boost::dynamic_pointer_cast<Coupon>(l5[i]);
ext::shared_ptr<Coupon> c = ext::dynamic_pointer_cast<Coupon>(l5[i]);
Date expected = c->accrualEndDate() - 2;
if (c->exCouponDate() != expected) {
BOOST_ERROR("ex-coupon date = " << c->exCouponDate() << " (" << expected
Expand All @@ -316,7 +316,7 @@ void CashFlowsTest::testExCouponDates() {
.withNotionals(100.0)
.withExCouponPeriod(Period(2, Days), NullCalendar(), Unadjusted, false);
for (Size i = 0; i < l6.size(); ++i) {
boost::shared_ptr<Coupon> c = boost::dynamic_pointer_cast<Coupon>(l6[i]);
ext::shared_ptr<Coupon> c = ext::dynamic_pointer_cast<Coupon>(l6[i]);
Date expected = c->accrualEndDate() - 2;
if (c->exCouponDate() != expected) {
BOOST_ERROR("ex-coupon date = " << c->exCouponDate() << " (" << expected
Expand All @@ -330,7 +330,7 @@ void CashFlowsTest::testExCouponDates() {
.withCouponRates(0.03, Actual360())
.withExCouponPeriod(Period(2, Days), TARGET(), Preceding, false);
for (Size i = 0; i < l7.size(); ++i) {
boost::shared_ptr<Coupon> c = boost::dynamic_pointer_cast<Coupon>(l7[i]);
ext::shared_ptr<Coupon> c = ext::dynamic_pointer_cast<Coupon>(l7[i]);
Date expected = TARGET().advance(c->accrualEndDate(), -2, Days);
if (c->exCouponDate() != expected) {
BOOST_ERROR("ex-coupon date = " << c->exCouponDate() << " (" << expected
Expand All @@ -342,7 +342,7 @@ void CashFlowsTest::testExCouponDates() {
.withNotionals(100.0)
.withExCouponPeriod(Period(2, Days), TARGET(), Preceding, false);
for (Size i = 0; i < l8.size(); ++i) {
boost::shared_ptr<Coupon> c = boost::dynamic_pointer_cast<Coupon>(l8[i]);
ext::shared_ptr<Coupon> c = ext::dynamic_pointer_cast<Coupon>(l8[i]);
Date expected = TARGET().advance(c->accrualEndDate(), -2, Days);
if (c->exCouponDate() != expected) {
BOOST_ERROR("ex-coupon date = " << c->exCouponDate() << " (" << expected
Expand Down

0 comments on commit a081649

Please sign in to comment.