lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 5ed45ad 2/5: Adapt 'product_file_test' to rec


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 5ed45ad 2/5: Adapt 'product_file_test' to recent database caching changes
Date: Wed, 3 Aug 2016 14:39:14 +0000 (UTC)

branch: master
commit 5ed45adb498db5df720f18dd54ad353f2695453a
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Adapt 'product_file_test' to recent database caching changes
    
    Class DBDictionary used to be a singleton, but now it's not--it has a
    normal ctor instead, as a consequence of recent changes that moved its
    caching to an auxiliary class. Neither the old nor the new caching has
    any effect on the speed measured by this unit test, which calls a
    lower-level function to load a database from file imperatively.
---
 product_file_test.cpp |   13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/product_file_test.cpp b/product_file_test.cpp
index 1efb60c..50d7deb 100644
--- a/product_file_test.cpp
+++ b/product_file_test.cpp
@@ -67,11 +67,11 @@ std::string product_file_test::stratified_filename_ ;
 
 void product_file_test::write_all_files()
 {
-    DBDictionary::instance() .WriteSampleDBFile      ();
-    product_data            ::WritePolFiles          ();
-    FundData                ::WriteFundFiles         ();
-    rounding_rules          ::write_rounding_files   ();
-    stratified_charges      ::write_stratified_files ();
+    DBDictionary()      .WriteSampleDBFile      ();
+    product_data       ::WritePolFiles          ();
+    FundData           ::WriteFundFiles         ();
+    rounding_rules     ::write_rounding_files   ();
+    stratified_charges ::write_stratified_files ();
 
     policy_filename_     = "sample";
     product_data p(policy_filename_);
@@ -83,8 +83,7 @@ void product_file_test::write_all_files()
 
 void product_file_test::read_database_file()
 {
-    DBDictionary::instance().InvalidateCache();
-    DBDictionary::instance().Init(database_filename_);
+    DBDictionary().Init(database_filename_);
 }
 
 void product_file_test::read_fund_file()



reply via email to

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