lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [5450] Refactor to support a forthcoming change


From: Greg Chicares
Subject: [lmi-commits] [5450] Refactor to support a forthcoming change
Date: Fri, 04 May 2012 10:20:34 +0000

Revision: 5450
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5450
Author:   chicares
Date:     2012-05-04 10:20:33 +0000 (Fri, 04 May 2012)
Log Message:
-----------
Refactor to support a forthcoming change

Modified Paths:
--------------
    lmi/trunk/test_coding_rules.cpp

Modified: lmi/trunk/test_coding_rules.cpp
===================================================================
--- lmi/trunk/test_coding_rules.cpp     2012-05-01 15:35:15 UTC (rev 5449)
+++ lmi/trunk/test_coding_rules.cpp     2012-05-04 10:20:33 UTC (rev 5450)
@@ -31,13 +31,13 @@
 #include "handle_exceptions.hpp"
 #include "istream_to_string.hpp"
 #include "main_common.hpp"
-#include "miscellany.hpp" // lmi_array_size()
+#include "miscellany.hpp"               // lmi_array_size()
 #include "obstruct_slicing.hpp"
 #include "uncopyable_lmi.hpp"
 
-#include <boost/filesystem/convenience.hpp>
+#include <boost/filesystem/convenience.hpp> // fs::extension()
 #include <boost/filesystem/fstream.hpp>
-#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem/operations.hpp>  // fs::exists(), fs::is_directory()
 #include <boost/filesystem/path.hpp>
 #include <boost/regex.hpp>
 
@@ -50,7 +50,7 @@
 #include <ostream>
 #include <set>
 #include <sstream>
-#include <stdexcept>
+#include <stdexcept>                    // std::runtime_error
 #include <string>
 
 std::string my_taboo_indulgence();       // See 'my_test_coding_rules.cpp'.
@@ -445,8 +445,9 @@
     std::time_t const t0 = fs::last_write_time(f.path());
     std::tm const*const t1 = std::gmtime(&t0);
     LMI_ASSERT(NULL != t1);
+    int const year = 1900 + t1->tm_year;
     std::ostringstream oss;
-    oss << "Copyright \\(C\\)[^\\n]*" << 1900 + t1->tm_year;
+    oss << "Copyright \\(C\\)[^\\n]*" << year;
     require(f, oss.str(), "lacks current copyright.");
 }
 




reply via email to

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