lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 812cf6b 5/9: Prepare to make an ancient unit


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 812cf6b 5/9: Prepare to make an ancient unit test useful
Date: Sun, 4 Apr 2021 07:00:20 -0400 (EDT)

branch: master
commit 812cf6bc0784a2638e3e39b37d63ddf1b5017879
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Prepare to make an ancient unit test useful
    
    In 2021, objects larger than 65535 bytes may be created on the stack.
---
 gpt_test.cpp | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/gpt_test.cpp b/gpt_test.cpp
index 1cd0ca7..cdeca65 100644
--- a/gpt_test.cpp
+++ b/gpt_test.cpp
@@ -660,11 +660,7 @@ void gpt_test::test_ancient()
     std::vector<double> prem_load_target     (length,  0.03    );
     std::vector<double> prem_load_excess     (length,  0.02    );
 
-    Timer timer;
-
-  for(int i = 0; i < 1000; ++i)
-    {
-    Irc7702* Irc7702_ = ::new Irc7702
+    Irc7702 z
         (mce_gpt                         // a_Test7702
         ,issue_age                       // a_IssueAge
         ,100                             // a_EndtAge
@@ -697,11 +693,7 @@ void gpt_test::test_ancient()
         ,0.0                             // a_InforceGSP
         ,0.0                             // a_InforceCumPremsPaid
         );
-    Irc7702_->Initialize7702(1000000.0, 1000000.0, mce_option1_for_7702, 
1000.0);
-    delete Irc7702_;
-    }
-
-    std::cout << timer.stop().elapsed_msec_str();
+    z.Initialize7702(1000000.0, 1000000.0, mce_option1_for_7702, 1000.0);
 }
 
 int test_main(int, char*[])



reply via email to

[Prev in Thread] Current Thread [Next in Thread]