[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] (no subject)
From: |
Greg Chicares |
Subject: |
[lmi-commits] (no subject) |
Date: |
Thu, 30 Jun 2016 21:01:37 +0000 (UTC) |
branch: master
commit 364b233b3b9e716f53f308be84c6df6474675787
Author: Gregory W. Chicares <address@hidden>
Date: Thu Jun 30 13:36:04 2016 +0000
Freeze "custom_io_1" crediting rate for regression testing
Regression testing generally uses static crediting rates, in order to
avoid gratuitous regressions when rates change. Tests for "custom_io_1"
formerly used the current rate; now, they use a static rate, as other
tests have done for years.
---
custom_io_1.cpp | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/custom_io_1.cpp b/custom_io_1.cpp
index 89f7927..2061b93 100644
--- a/custom_io_1.cpp
+++ b/custom_io_1.cpp
@@ -161,8 +161,17 @@ bool custom_io_1_read(Input& z, std::string const&
filename)
if(ApplicantPermFlatExtraAmt.empty()) ApplicantPermFlatExtraAmt = "0.0";
if(ApplicantTempFlatExtraAmt.empty()) ApplicantTempFlatExtraAmt = "0.0";
- // Always use the current declared rate; disregard <InterestRateData>.
+ // Always disregard <InterestRateData>. Use the current declared
+ // rate vector in production. For regression testing, hardcode
+ // arbitrary rates in order to avoid gratuitous regression errors.
+ // The hardcoded rates deliberately use more than the usual number
+ // of decimal places to make the regression test finickier.
z["UseCurrentDeclaredRate"] = "Yes";
+ if(global_settings::instance().regression_testing())
+ {
+ z["UseCurrentDeclaredRate"] = "No";
+ z["GeneralAccountRate"] = "0.04321012; 0.04321098";
+ }
// Always calculate issue age from DOB. <ApplicantDOB> is always
// specified. This is robust: lmi knows exactly how to calculate