[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [5798] Fix defect introduced 20131003T2105Z
From: |
Greg Chicares |
Subject: |
[lmi-commits] [5798] Fix defect introduced 20131003T2105Z |
Date: |
Fri, 18 Oct 2013 11:43:40 +0000 |
Revision: 5798
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5798
Author: chicares
Date: 2013-10-18 11:43:32 +0000 (Fri, 18 Oct 2013)
Log Message:
-----------
Fix defect introduced 20131003T2105Z
Modified Paths:
--------------
lmi/trunk/ChangeLog
lmi/trunk/gpt_test.cpp
Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2013-10-18 11:09:11 UTC (rev 5797)
+++ lmi/trunk/ChangeLog 2013-10-18 11:43:32 UTC (rev 5798)
@@ -32702,3 +32702,24 @@
gpt_commutation_functions.cpp
Refactor for clarity and speed.
+20131015T2329Z <address@hidden> [542]
+
+ gpt_test.cpp
+Refactor for flexibility and simplicity.
+
+20131016T1117Z <address@hidden> [542]
+
+ gpt_test.cpp
+Exercise all QABs.
+
+20131018T1109Z <address@hidden> [542]
+
+ gpt_test.cpp
+Demonstrate defect introduced 20131003T2105Z.
+
+20131018T1143Z <address@hidden> [542]
+
+ gpt_test.cpp
+Fix defect introduced 20131003T2105Z: misplaced 'static' caused an
+argument to be ignored, weakening downstream tests.
+
Modified: lmi/trunk/gpt_test.cpp
===================================================================
--- lmi/trunk/gpt_test.cpp 2013-10-18 11:09:11 UTC (rev 5797)
+++ lmi/trunk/gpt_test.cpp 2013-10-18 11:43:32 UTC (rev 5798)
@@ -50,7 +50,7 @@
/// SOA database table 42: "1980 US CSO Male Age nearest".
-std::vector<double> const& sample_q(int age)
+std::vector<double> sample_q(int age)
{
static int const n = 100;
LMI_ASSERT(0 <= age && age < n);
@@ -67,10 +67,9 @@
,0.09884, 0.10748, 0.11725, 0.12826, 0.14025, 0.15295, 0.16609,
0.17955, 0.19327, 0.20729 // 80
,0.22177, 0.23698, 0.25345, 0.27211, 0.29590, 0.32996, 0.38455,
0.48020, 0.65798, 1.00000 // 90
};
- static std::vector<double> const q_a(q + age, q + n);
+ static std::vector<double> const q_a(q, q + n);
static std::vector<double> const q_m(a_to_m(q_a));
- LMI_ASSERT(q_m.size() == static_cast<unsigned int>(n - age));
- return q_m;
+ return std::vector<double>(q_m.begin() + age, q_m.end());
}
// These could be made static members of class gpt_test, but this way
@@ -339,6 +338,7 @@
#endif // !defined LMI_COMO_WITH_MINGW
int const omega = sample_q(0).size();
+ LMI_ASSERT(qab_waiver_rate.size() == static_cast<unsigned int>(omega -
issue_age));
for(int duration = 0; duration < omega - issue_age; ++duration)
{
parms.duration = duration;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [5798] Fix defect introduced 20131003T2105Z,
Greg Chicares <=