[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [5309] Replace deprecated HOPEFULLY macro in various files
From: |
Greg Chicares |
Subject: |
[lmi-commits] [5309] Replace deprecated HOPEFULLY macro in various files |
Date: |
Sat, 19 Nov 2011 13:29:31 +0000 |
Revision: 5309
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5309
Author: chicares
Date: 2011-11-19 13:29:31 +0000 (Sat, 19 Nov 2011)
Log Message:
-----------
Replace deprecated HOPEFULLY macro in various files
Modified Paths:
--------------
lmi/trunk/custom_io_0.cpp
lmi/trunk/ihs_irc7702.cpp
lmi/trunk/ihs_irc7702a.cpp
Modified: lmi/trunk/custom_io_0.cpp
===================================================================
--- lmi/trunk/custom_io_0.cpp 2011-11-12 10:53:15 UTC (rev 5308)
+++ lmi/trunk/custom_io_0.cpp 2011-11-19 13:29:31 UTC (rev 5309)
@@ -29,6 +29,7 @@
#include "custom_io_0.hpp"
#include "alert.hpp"
+#include "assert_lmi.hpp"
#include "configurable_settings.hpp"
#include "database.hpp"
#include "dbnames.hpp"
@@ -120,7 +121,7 @@
// and the current declared rate is used. It is expected that
// this will not be acceptable for long.
- HOPEFULLY(!declared_rate.empty());
+ LMI_ASSERT(!declared_rate.empty());
std::vector<double> general_account_rate(declared_rate);
if(credited_rates_fit_customer_paradigm)
Modified: lmi/trunk/ihs_irc7702.cpp
===================================================================
--- lmi/trunk/ihs_irc7702.cpp 2011-11-12 10:53:15 UTC (rev 5308)
+++ lmi/trunk/ihs_irc7702.cpp 2011-11-19 13:29:31 UTC (rev 5309)
@@ -29,6 +29,7 @@
#include "ihs_irc7702.hpp"
#include "alert.hpp"
+#include "assert_lmi.hpp"
#include "basic_values.hpp" // For target-premium callback.
#include "commutation_functions.hpp"
#include "materially_equal.hpp"
@@ -176,8 +177,8 @@
,InforceCumGLP (a_InforceCumGLP)
,InforceGSP (a_InforceGSP)
{
- HOPEFULLY(a_PresentSpecAmt <= a_PresentBftAmt);
- HOPEFULLY(a_PriorSpecAmt <= a_PriorBftAmt);
+ LMI_ASSERT(a_PresentSpecAmt <= a_PresentBftAmt);
+ LMI_ASSERT(a_PriorSpecAmt <= a_PriorBftAmt);
// TODO ?? Instead put these in initializer-list and write assertions?
if(0 == InforceDuration)
{
@@ -199,8 +200,8 @@
PriorBftAmt = a_PriorBftAmt;
PriorSpecAmt = a_PriorSpecAmt;
LeastBftAmtEver = a_LeastBftAmtEver;
- HOPEFULLY(LeastBftAmtEver <= PriorBftAmt);
- HOPEFULLY(LeastBftAmtEver <= PresentBftAmt);
+ LMI_ASSERT(LeastBftAmtEver <= PriorBftAmt);
+ LMI_ASSERT(LeastBftAmtEver <= PresentBftAmt);
// TODO ?? Think more about inforce.
CumGLP = InforceCumGLP; // TODO ?? Don't need as member?
GptLimit = 0.0; // TODO ??
@@ -235,7 +236,7 @@
{
return;
}
- HOPEFULLY(CumPmts <= GptLimit);
+ LMI_ASSERT(CumPmts <= GptLimit);
a_Pmt = std::min(a_Pmt ,round_max_premium(GptLimit - CumPmts));
CumPmts += a_Pmt;
}
@@ -276,14 +277,14 @@
,mcenum_dbopt_7702 a_PriorDBOpt
)
{
- HOPEFULLY(a_PriorSpecAmt <= a_PriorBftAmt);
+ LMI_ASSERT(a_PriorSpecAmt <= a_PriorBftAmt);
// We do not assert this:
-// HOPEFULLY(materially_equal(PresentBftAmt, a_PriorBftAmt));
+// LMI_ASSERT(materially_equal(PresentBftAmt, a_PriorBftAmt));
// because a_PriorBftAmt is now DB as of the beginning of the current day,
// before any transactions are applied, which is not necessarily the same
// as DB as of the last adjustment event.
- HOPEFULLY(materially_equal(PresentSpecAmt, a_PriorSpecAmt));
- HOPEFULLY(PresentDBOpt == a_PriorDBOpt);
+ LMI_ASSERT(materially_equal(PresentSpecAmt, a_PriorSpecAmt));
+ LMI_ASSERT(PresentDBOpt == a_PriorDBOpt);
// Should be called only when something actually changed: either
// dbopt changed; or
// specamt changed, causing an actual change in bftamt.
@@ -299,7 +300,7 @@
)
|| a_NewDBOpt != a_PriorDBOpt
;
- HOPEFULLY(adj_event);
+ LMI_ASSERT(adj_event);
// Post BftAmt, SpecAmt, DBOpt changes to local state.
PriorBftAmt = PresentBftAmt;
@@ -375,7 +376,7 @@
{
Length = Qc.size();
// TODO ?? Assumes that endowment age is always 100--should pass as arg
instead.
- HOPEFULLY(Length == EndtAge - IssueAge);
+ LMI_ASSERT(Length == EndtAge - IssueAge);
// For now, always perform both GPT and CVAT calculations.
// GLP might be wanted for some purpose in a CVAT product.
@@ -483,7 +484,7 @@
// GPT corridor
std::vector<double>::const_iterator corr = CompleteGptCorridor().begin();
- HOPEFULLY
+ LMI_ASSERT
( static_cast<unsigned int>(IssueAge)
<= CompleteGptCorridor().size()
);
@@ -515,9 +516,9 @@
// ET !! std::vector<double> ann_chg_pol = AnnChgPol * comm_fns.aD();
std::vector<double> ann_chg_pol(Length);
- HOPEFULLY(u_length == ann_chg_pol.size());
- HOPEFULLY(u_length == AnnChgPol.size());
- HOPEFULLY(u_length == comm_fns.aD().size());
+ LMI_ASSERT(u_length == ann_chg_pol.size());
+ LMI_ASSERT(u_length == AnnChgPol.size());
+ LMI_ASSERT(u_length == comm_fns.aD().size());
std::transform
(AnnChgPol.begin()
,AnnChgPol.end()
@@ -528,9 +529,9 @@
// ET !! std::vector<double> mly_chg_pol = MlyChgPol * drop(comm_fns.kD(),
-1);
std::vector<double> mly_chg_pol(Length);
- HOPEFULLY(u_length == mly_chg_pol.size());
- HOPEFULLY(u_length == MlyChgPol.size());
- HOPEFULLY(u_length <= comm_fns.kD().size());
+ LMI_ASSERT(u_length == mly_chg_pol.size());
+ LMI_ASSERT(u_length == MlyChgPol.size());
+ LMI_ASSERT(u_length <= comm_fns.kD().size());
std::transform
(MlyChgPol.begin()
,MlyChgPol.end()
@@ -550,9 +551,9 @@
// ET !! PvChgPol[a_EIOBasis] = ann_chg_pol + mly_chg_pol;
std::vector<double>& chg_pol = PvChgPol[a_EIOBasis];
chg_pol.resize(Length);
- HOPEFULLY(u_length == chg_pol.size());
- HOPEFULLY(u_length == ann_chg_pol.size());
- HOPEFULLY(u_length <= mly_chg_pol.size());
+ LMI_ASSERT(u_length == chg_pol.size());
+ LMI_ASSERT(u_length == ann_chg_pol.size());
+ LMI_ASSERT(u_length <= mly_chg_pol.size());
std::transform
(ann_chg_pol.begin()
,ann_chg_pol.end()
@@ -575,9 +576,9 @@
// ET !! PvChgSpecAmt[a_EIOBasis] = MlyChgSpecAmt * comm_fns.kD();
std::vector<double>& chg_sa = PvChgSpecAmt[a_EIOBasis];
chg_sa.resize(Length);
- HOPEFULLY(u_length == chg_sa.size());
- HOPEFULLY(u_length == MlyChgSpecAmt.size());
- HOPEFULLY(u_length == comm_fns.kD().size());
+ LMI_ASSERT(u_length == chg_sa.size());
+ LMI_ASSERT(u_length == MlyChgSpecAmt.size());
+ LMI_ASSERT(u_length == comm_fns.kD().size());
std::transform
(MlyChgSpecAmt.begin()
,MlyChgSpecAmt.end()
@@ -593,9 +594,9 @@
// ET !! PvChgADD[a_EIOBasis] = MlyChgADD * comm_fns.kD();
std::vector<double>& chg_add = PvChgADD[a_EIOBasis];
chg_add.resize(Length);
- HOPEFULLY(u_length == chg_add.size());
- HOPEFULLY(u_length == MlyChgADD.size());
- HOPEFULLY(u_length == comm_fns.kD().size());
+ LMI_ASSERT(u_length == chg_add.size());
+ LMI_ASSERT(u_length == MlyChgADD.size());
+ LMI_ASSERT(u_length == comm_fns.kD().size());
std::transform
(MlyChgADD.begin()
,MlyChgADD.end()
@@ -609,7 +610,7 @@
// APL: chg_mort gets rotate plus scan rotate kC
std::vector<double>& chg_mort = PvChgMort[a_EIOBasis];
- HOPEFULLY(u_length <= comm_fns.kC().size());
+ LMI_ASSERT(u_length <= comm_fns.kC().size());
chg_mort = comm_fns.kC();
chg_mort.resize(Length);
std::reverse(chg_mort.begin(), chg_mort.end());
@@ -620,14 +621,14 @@
// ET !! PvNpfSglTgt[a_EIOBasis] = (1.0 - LoadTgt) * comm_fns.aD();
std::vector<double>& npf_sgl_tgt = PvNpfSglTgt[a_EIOBasis];
-// HOPEFULLY(u_length == npf_sgl_tgt.size());
+// LMI_ASSERT(u_length == npf_sgl_tgt.size());
npf_sgl_tgt = LoadTgt;
- HOPEFULLY(u_length == npf_sgl_tgt.size());
+ LMI_ASSERT(u_length == npf_sgl_tgt.size());
std::transform(npf_sgl_tgt.begin(), npf_sgl_tgt.end(), npf_sgl_tgt.begin()
,std::bind1st(std::minus<double>(), 1.0)
);
- HOPEFULLY(u_length == npf_sgl_tgt.size());
- HOPEFULLY(u_length == comm_fns.aD().size());
+ LMI_ASSERT(u_length == npf_sgl_tgt.size());
+ LMI_ASSERT(u_length == comm_fns.aD().size());
std::transform
(npf_sgl_tgt.begin()
,npf_sgl_tgt.end()
@@ -636,9 +637,9 @@
,std::multiplies<double>()
);
std::vector<double>& npf_lvl_tgt = PvNpfLvlTgt[a_EIOBasis];
-// HOPEFULLY(u_length == npf_lvl_tgt.size());
+// LMI_ASSERT(u_length == npf_lvl_tgt.size());
npf_lvl_tgt = npf_sgl_tgt;
- HOPEFULLY(u_length == npf_lvl_tgt.size());
+ LMI_ASSERT(u_length == npf_lvl_tgt.size());
std::reverse(npf_lvl_tgt.begin(), npf_lvl_tgt.end());
std::partial_sum(npf_lvl_tgt.begin(), npf_lvl_tgt.end(),
npf_lvl_tgt.begin());
std::reverse(npf_lvl_tgt.begin(), npf_lvl_tgt.end());
@@ -647,14 +648,14 @@
// ET !! PvNpfSglExc[a_EIOBasis] = (1.0 - LoadExc) * comm_fns.aD();
std::vector<double>& npf_sgl_exc = PvNpfSglExc[a_EIOBasis];
-// HOPEFULLY(u_length == npf_sgl_exc.size());
+// LMI_ASSERT(u_length == npf_sgl_exc.size());
npf_sgl_exc = LoadExc;
- HOPEFULLY(u_length == npf_sgl_exc.size());
+ LMI_ASSERT(u_length == npf_sgl_exc.size());
std::transform(npf_sgl_exc.begin(), npf_sgl_exc.end(), npf_sgl_exc.begin()
,std::bind1st(std::minus<double>(), 1.0)
);
- HOPEFULLY(u_length == npf_sgl_tgt.size());
- HOPEFULLY(u_length == comm_fns.aD().size());
+ LMI_ASSERT(u_length == npf_sgl_tgt.size());
+ LMI_ASSERT(u_length == comm_fns.aD().size());
std::transform
(npf_sgl_exc.begin()
,npf_sgl_exc.end()
@@ -663,9 +664,9 @@
,std::multiplies<double>()
);
std::vector<double>& npf_lvl_exc = PvNpfLvlExc[a_EIOBasis];
-// HOPEFULLY(u_length == npf_lvl_exc.size());
+// LMI_ASSERT(u_length == npf_lvl_exc.size());
npf_lvl_exc = npf_sgl_exc;
- HOPEFULLY(u_length == npf_lvl_exc.size());
+ LMI_ASSERT(u_length == npf_lvl_exc.size());
std::reverse(npf_lvl_exc.begin(), npf_lvl_exc.end());
std::partial_sum(npf_lvl_exc.begin(), npf_lvl_exc.end(),
npf_lvl_exc.begin());
std::reverse(npf_lvl_exc.begin(), npf_lvl_exc.end());
@@ -674,11 +675,11 @@
// ET !! PvLoadDiffSgl[a_EIOBasis] = npf_sgl_exc - npf_sgl_tgt;
std::vector<double>& diff_sgl = PvLoadDiffSgl[a_EIOBasis];
-// HOPEFULLY(u_length == diff_sgl.size());
+// LMI_ASSERT(u_length == diff_sgl.size());
diff_sgl.resize(Length);
- HOPEFULLY(u_length == diff_sgl.size());
- HOPEFULLY(u_length == npf_sgl_exc.size());
- HOPEFULLY(u_length == npf_sgl_tgt.size());
+ LMI_ASSERT(u_length == diff_sgl.size());
+ LMI_ASSERT(u_length == npf_sgl_exc.size());
+ LMI_ASSERT(u_length == npf_sgl_tgt.size());
std::transform
(npf_sgl_exc.begin()
,npf_sgl_exc.end()
@@ -687,9 +688,9 @@
,std::minus<double>()
);
std::vector<double>& diff_lvl = PvLoadDiffLvl[a_EIOBasis];
-// HOPEFULLY(u_length == diff_lvl.size());
+// LMI_ASSERT(u_length == diff_lvl.size());
diff_lvl.resize(Length);
- HOPEFULLY(u_length == diff_lvl.size());
+ LMI_ASSERT(u_length == diff_lvl.size());
std::reverse(diff_lvl.begin(), diff_lvl.end());
std::partial_sum(diff_lvl.begin(), diff_lvl.end(), diff_lvl.begin());
std::reverse(diff_lvl.begin(), diff_lvl.end());
@@ -712,7 +713,7 @@
,mcenum_dbopt_7702 a_DBOpt
)
{
- HOPEFULLY(a_SpecAmt <= a_BftAmt);
+ LMI_ASSERT(a_SpecAmt <= a_BftAmt);
PresentDBOpt = a_DBOpt;
PriorDBOpt = PresentDBOpt;
Initialize7702(a_SpecAmt);
@@ -829,7 +830,7 @@
,mcenum_dbopt_7702 a_DBOpt
) const
{
- HOPEFULLY(a_SpecAmt <= a_BftAmt);
+ LMI_ASSERT(a_SpecAmt <= a_BftAmt);
return CalculatePremium
(Get4PctBasis(a_DBOpt)
,a_Duration
@@ -849,7 +850,7 @@
,double a_LeastBftAmtEver
) const
{
- HOPEFULLY(a_SpecAmt <= a_BftAmt);
+ LMI_ASSERT(a_SpecAmt <= a_BftAmt);
return CalculatePremium
(Opt1Int6Pct
,a_Duration
@@ -872,9 +873,9 @@
,double a_NetPmtFactorExc
) const
{
- HOPEFULLY(a_SpecAmt <= a_BftAmt);
- HOPEFULLY(0.0 != a_NetPmtFactorTgt);
- HOPEFULLY(0.0 != a_NetPmtFactorExc);
+ LMI_ASSERT(a_SpecAmt <= a_BftAmt);
+ LMI_ASSERT(0.0 != a_NetPmtFactorTgt);
+ LMI_ASSERT(0.0 != a_NetPmtFactorExc);
// TODO ?? This implementation is correct only if TargetPremium
// is fixed forever at issue; otherwise, we need either a
@@ -947,7 +948,7 @@
{
denom -= CFFourPctMin->N()[7 + j];
}
- HOPEFULLY(0.0 != denom);
+ LMI_ASSERT(0.0 != denom);
mep_rate[j] =
( CFFourPctMin->M()[j]
/ denom
@@ -1058,9 +1059,9 @@
,double a_NetPmtFactorExc
) const
{
- HOPEFULLY(0.0 != a_Premium);
- HOPEFULLY(0.0 != a_NetPmtFactorTgt);
- HOPEFULLY(0.0 != a_NetPmtFactorExc);
+ LMI_ASSERT(0.0 != a_Premium);
+ LMI_ASSERT(0.0 != a_NetPmtFactorTgt);
+ LMI_ASSERT(0.0 != a_NetPmtFactorExc);
FindSpecAmt fsa
(*this
Modified: lmi/trunk/ihs_irc7702a.cpp
===================================================================
--- lmi/trunk/ihs_irc7702a.cpp 2011-11-12 10:53:15 UTC (rev 5308)
+++ lmi/trunk/ihs_irc7702a.cpp 2011-11-19 13:29:31 UTC (rev 5309)
@@ -124,7 +124,7 @@
{
case mce_unnecessary_premium:
{
- HOPEFULLY(mce_cvat == DefnLifeIns);
+ LMI_ASSERT(mce_cvat == DefnLifeIns);
UnnecPremIsMatChg = true;
ElectiveIncrIsMatChg = false;
DBDefn = e_specamt_7702A;
@@ -132,7 +132,7 @@
break;
case mce_benefit_increase:
{
- HOPEFULLY(mce_cvat == DefnLifeIns);
+ LMI_ASSERT(mce_cvat == DefnLifeIns);
UnnecPremIsMatChg = false;
ElectiveIncrIsMatChg = true;
DBDefn = e_death_benefit_7702A;
@@ -145,7 +145,7 @@
<< "mce_later_of_increase_or_unnecessary_premium not
implemented."
<< LMI_FLUSH
;
- HOPEFULLY(mce_cvat == DefnLifeIns);
+ LMI_ASSERT(mce_cvat == DefnLifeIns);
UnnecPremIsMatChg = true;
ElectiveIncrIsMatChg = true;
DBDefn = e_specamt_7702A;
@@ -153,7 +153,7 @@
break;
case mce_earlier_of_increase_or_unnecessary_premium:
{
- HOPEFULLY(mce_cvat == DefnLifeIns);
+ LMI_ASSERT(mce_cvat == DefnLifeIns);
UnnecPremIsMatChg = true;
ElectiveIncrIsMatChg = true;
DBDefn = e_specamt_7702A;
@@ -161,7 +161,7 @@
break;
case mce_adjustment_event:
{
- HOPEFULLY(mce_gpt == DefnLifeIns);
+ LMI_ASSERT(mce_gpt == DefnLifeIns);
UnnecPremIsMatChg = false;
ElectiveIncrIsMatChg = false;
DBDefn = e_death_benefit_7702A;
@@ -215,7 +215,7 @@
LMI_ASSERT(0 < a_Bfts.size());
double lowest_bft = *std::min_element(a_Bfts.begin(), a_Bfts.end());
// Allow Bfts to be zero for solves.
- HOPEFULLY(0.0 <= lowest_bft);
+ LMI_ASSERT(0.0 <= lowest_bft);
// TODO ?? Should we assert that this equals 'a_LowestBft'?
// If we can, then we don't need the latter as an argument.
@@ -271,13 +271,13 @@
Pmts.assign(max_dur, 0.0);
Bfts.assign(max_dur, 0.0);
- HOPEFULLY(a_Pmts.size() <= max_years);
+ LMI_ASSERT(a_Pmts.size() <= max_years);
for(unsigned int j = 0; j < a_Pmts.size(); ++j)
{
// TODO ?? OK to treat premium history as annual?
Pmts[j * months_per_year] = a_Pmts[j];
}
- HOPEFULLY(a_Bfts.size() <= max_years);
+ LMI_ASSERT(a_Bfts.size() <= max_years);
// UpdateBft7702A() updates this, thus:
// Bfts[TestPeriodDur] = current_bft;
// so should we make sure Bfts[TestPeriodDur] is zero here?
@@ -357,7 +357,7 @@
PolicyYear = a_PolicyYear;
// A negative policy year makes no sense
- HOPEFULLY(0 <= PolicyYear);
+ LMI_ASSERT(0 <= PolicyYear);
// Update cumulative 7pp
if(TestPeriodDur < TestPeriodLen)
@@ -402,8 +402,8 @@
// of times, then
// lo_val should equal zero minus lo_decrement, and
// hi_val should equal the next year's NSP plus hi_increment
- HOPEFULLY(materially_equal(lo_val, (-lo_decrement)));
- HOPEFULLY(materially_equal(hi_val, (NSPEnd + hi_increment)));
+ LMI_ASSERT(materially_equal(lo_val, (-lo_decrement)));
+ LMI_ASSERT(materially_equal(hi_val, (NSPEnd + hi_increment)));
// The average of the interpolated values should equal the average
// of the endpoints
double avg_interp =
@@ -412,7 +412,7 @@
double avg_endpts =
(NSPBeg + NSPEnd)
/ 2.0;
- HOPEFULLY(materially_equal(avg_interp, avg_endpts));
+ LMI_ASSERT(materially_equal(avg_interp, avg_endpts));
// We do not assert that NSP increases by duration. That might not be
// true in the case of a high substandard rating that is "forgiven"
// after some period of time.
@@ -436,7 +436,7 @@
IsMatChg = false;
PolicyMonth = a_PolicyMonth;
// A negative policy month makes no sense
- HOPEFULLY(0 <= PolicyMonth);
+ LMI_ASSERT(0 <= PolicyMonth);
}
//============================================================================
@@ -460,7 +460,7 @@
,double a_Bft
)
{
- HOPEFULLY(0.0 <= a_Net1035Amount);
+ LMI_ASSERT(0.0 <= a_Net1035Amount);
a_DeemedCashValue = a_Net1035Amount;
if(Ignore)
@@ -616,7 +616,7 @@
{
if(TestPeriodDur < TestPeriodLen)
{
- HOPEFULLY(CumPmts <= CumSevenPP);
+ LMI_ASSERT(CumPmts <= CumSevenPP);
state_.Q6_max_non_mec_prem = RoundNonMecPrem(CumSevenPP - CumPmts);
return state_.Q6_max_non_mec_prem;
}
@@ -687,9 +687,9 @@
DetermineLowestBft();
double nsp = MlyInterpNSP[PolicyMonth] * LowestBft;
- HOPEFULLY(0.0 <= a_DeemedCashValue);
+ LMI_ASSERT(0.0 <= a_DeemedCashValue);
// We don't assert
- // HOPEFULLY(0.0 <= a_CashValue);
+ // LMI_ASSERT(0.0 <= a_CashValue);
// because allowing account (hence cash) value to be negative
// makes solves easier.
@@ -729,7 +729,7 @@
}
// TODO ?? Not necessarily true if we net out WD?
-// HOPEFULLY(0.0 <= a_Payment);
+// LMI_ASSERT(0.0 <= a_Payment);
// As long as we're MEC testing, this function should be called whenever a
// payment is set, and no more than once each month. Therefore, when it's
@@ -739,7 +739,7 @@
// TODO ?? But then how will we handle a WD? Separate function?
//
// Changed anyway: called twice a month when there's a material change.
-// HOPEFULLY(0.0 == Pmts[TestPeriodDur]);
+// LMI_ASSERT(0.0 == Pmts[TestPeriodDur]);
// During the test period (only), we accumulate premiums and compare
// to the seven-pay limit. We store premium history for this period(or
longer?)
@@ -904,15 +904,15 @@
}
// Allow Bfts to be zero for solves.
- HOPEFULLY(0.0 <= a_NewDB);
- HOPEFULLY(0.0 <= a_OldDB);
- HOPEFULLY(0.0 <= a_NewSA);
- HOPEFULLY(0.0 <= a_OldSA);
+ LMI_ASSERT(0.0 <= a_NewDB);
+ LMI_ASSERT(0.0 <= a_OldDB);
+ LMI_ASSERT(0.0 <= a_NewSA);
+ LMI_ASSERT(0.0 <= a_OldSA);
// I believe that the death benefit, unlike the premium, can be set more
// than once per month in the present code. I do not know whether or not
// this can be avoided. TODO ?? Figure this out.
- HOPEFULLY(TestPeriodDur < static_cast<int>(Bfts.size()));
+ LMI_ASSERT(TestPeriodDur < static_cast<int>(Bfts.size()));
double current_bft = 0.0;
if(e_death_benefit_7702A == DBDefn)
@@ -1036,7 +1036,7 @@
// If the new (reduced) Bft is not lower than the Bft assumed in
// calculating the last 7pp, then there's no need to retest. If
// that was the case, we shouldn't have gotten here.
- HOPEFULLY(a_NewBft < LowestBft);
+ LMI_ASSERT(a_NewBft < LowestBft);
LowestBft = std::min(LowestBft, a_NewBft);
// Recalculate 7pp to reflect lower death benefit.
@@ -1219,7 +1219,7 @@
// TODO ?? NO LONGER TRUE.
if(a_TriggeredByUnnecPrem)
{
- HOPEFULLY(a_TriggeredByMatChg);
+ LMI_ASSERT(a_TriggeredByMatChg);
}
AssumedBft = a_Bft;
@@ -1253,7 +1253,7 @@
// No material change--either we're initializing, or processing
// a Bfts decrease. NO...could be an inforce case.
// TODO ?? expunge
-// HOPEFULLY
+// LMI_ASSERT
// ( a_TriggeredByBftDecrease
// || (0 == PolicyYear && 0 == PolicyMonth)
// );
@@ -1264,7 +1264,7 @@
// should have their proper initial values.
if(0 == PolicyYear && 0 == PolicyMonth)
{
-// HOPEFULLY(0.0 == SavedAVBeforeMatChg);
+// LMI_ASSERT(0.0 == SavedAVBeforeMatChg);
// SavedAVBeforeMatChg should be zero unless there was a 1035, in
// which case it should be the net 1035 amount. I'm not sure we should
// either rely on 'SavedDCV' (which was added for monthly trace only) or
@@ -1272,13 +1272,13 @@
// that 'SavedDCV', because of its limited purpose, isn't reliably
// initialized; I'm not sure we should promote that variable to a
// first-class citizen by initializing it carefully.
- HOPEFULLY
+ LMI_ASSERT
( 0.0 == SavedAVBeforeMatChg
|| materially_equal(SavedDCV, SavedAVBeforeMatChg)
);
- HOPEFULLY(0.0 == SavedNecPrem);
- HOPEFULLY(materially_equal(SevenPPRateVec[0], Saved7PPRate));
- HOPEFULLY(materially_equal(NSPVec[0], SavedNSP));
+ LMI_ASSERT(0.0 == SavedNecPrem);
+ LMI_ASSERT(materially_equal(SevenPPRateVec[0], Saved7PPRate));
+ LMI_ASSERT(materially_equal(NSPVec[0], SavedNSP));
}
/* TODO ?? Expunge this perhaps. Not sure what we should do if someone
tries running an inforce case as of month 0, year 0.
@@ -1290,8 +1290,8 @@
// || (0 == PolicyYear && 0 == PolicyMonth)
// )
// {
-// HOPEFULLY(0.0 == a_AVBeforeMatChg);
-// HOPEFULLY(0.0 == a_NecPrem);
+// LMI_ASSERT(0.0 == a_AVBeforeMatChg);
+// LMI_ASSERT(0.0 == a_NecPrem);
// }
*/
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [5309] Replace deprecated HOPEFULLY macro in various files,
Greg Chicares <=