[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [6419] Add more assertions
From: |
Greg Chicares |
Subject: |
[lmi-commits] [6419] Add more assertions |
Date: |
Fri, 20 Nov 2015 21:11:19 +0000 |
Revision: 6419
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6419
Author: chicares
Date: 2015-11-20 21:11:18 +0000 (Fri, 20 Nov 2015)
Log Message:
-----------
Add more assertions
Modified Paths:
--------------
lmi/trunk/ihs_acctval.cpp
Modified: lmi/trunk/ihs_acctval.cpp
===================================================================
--- lmi/trunk/ihs_acctval.cpp 2015-11-20 21:10:14 UTC (rev 6418)
+++ lmi/trunk/ihs_acctval.cpp 2015-11-20 21:11:18 UTC (rev 6419)
@@ -1100,22 +1100,39 @@
,bool with_wp
) const
{
+ LMI_ASSERT(0 == Year);
+
yare_input yi(yare_input_);
yi.AccidentalDeathBenefit = with_adb;
yi.WaiverOfPremiumBenefit = with_wp;
+ double z;
if(!SplitMinPrem)
{
- return GetModalPremMlyDed(year, mode, specamt, yi);
+ z = GetModalPremMlyDed(year, mode, specamt, yi);
}
else
{
- return
+ z =
GetModalPremMlyDedEe(year, mode, termamt, yi)
+ GetModalPremMlyDedEr(year, mode, specamt, yi)
;
}
+
+ // If minimum premiums are of the 'oe_monthly_deduction' type,
+ // then the initial modal minimum premium previously calculated
+ // must equal the "suppositive" result for the same rider choices.
+ if
+ ( oe_monthly_deduction == MinPremType
+ && yi.AccidentalDeathBenefit == yare_input_.AccidentalDeathBenefit
+ && yi.WaiverOfPremiumBenefit == yare_input_.WaiverOfPremiumBenefit
+ )
+ {
+ LMI_ASSERT(z == InvariantValues().ModalMinimumPremium[0]);
+ }
+
+ return z;
}
//============================================================================
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [6419] Add more assertions,
Greg Chicares <=