lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [6049] Eliminate log-message prefix


From: Greg Chicares
Subject: [lmi-commits] [6049] Eliminate log-message prefix
Date: Sat, 06 Dec 2014 18:47:17 +0000

Revision: 6049
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6049
Author:   chicares
Date:     2014-12-06 18:47:16 +0000 (Sat, 06 Dec 2014)
Log Message:
-----------
Eliminate log-message prefix

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/main_wx_test.cpp

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2014-12-06 18:11:32 UTC (rev 6048)
+++ lmi/trunk/ChangeLog 2014-12-06 18:47:16 UTC (rev 6049)
@@ -34740,3 +34740,9 @@
 Don't send wxEVT_UPDATE_UI events manually in GUI tests. See:
   http://lists.nongnu.org/archive/html/lmi/2014-12/msg00014.html
 
+20141206T1847Z <address@hidden> [516]
+
+  main_wx_test.cpp
+Eliminate log-message prefix. See:
+  http://lists.nongnu.org/archive/html/lmi/2014-12/msg00012.html
+

Modified: lmi/trunk/main_wx_test.cpp
===================================================================
--- lmi/trunk/main_wx_test.cpp  2014-12-06 18:11:32 UTC (rev 6048)
+++ lmi/trunk/main_wx_test.cpp  2014-12-06 18:47:16 UTC (rev 6049)
@@ -64,8 +64,6 @@
 #   error wxWidgets 3.1.0 or later is required for the test suite.
 #endif
 
-static char const* const LOG_PREFIX = "[TEST] ";
-
 class SkeletonTest;
 DECLARE_APP(SkeletonTest)
 
@@ -390,16 +388,16 @@
 
             try
                 {
-                wxLogMessage("%s%s: started", LOG_PREFIX, name);
+                wxLogMessage("%s: started", name);
                 wxStopWatch sw;
                 i->run_test();
-                wxLogMessage("%stime=%ldms (for %s)", LOG_PREFIX, sw.Time(), 
name);
-                wxLogMessage("%s%s: ok", LOG_PREFIX, name);
+                wxLogMessage("time=%ldms (for %s)", sw.Time(), name);
+                wxLogMessage("%s: ok", name);
                 results.passed++;
                 }
             catch(test_skipped_exception const& e)
                 {
-                wxLogMessage("%s%s: skipped (%s)", LOG_PREFIX, name, e.what());
+                wxLogMessage("%s: skipped (%s)", name, e.what());
                 results.skipped++;
                 }
             catch(std::exception const& e)
@@ -421,12 +419,7 @@
                 wxString one_line_error(error);
                 one_line_error.Replace("\n", " ");
 
-                wxLogMessage
-                    ("%s%s: ERROR (%s)"
-                    ,LOG_PREFIX
-                    ,name
-                    ,one_line_error
-                    );
+                wxLogMessage("%s: ERROR (%s)", name, one_line_error);
                 }
             }
         }
@@ -653,7 +646,7 @@
 
     mainWin->SetFocus();
 
-    wxLogMessage("%sNOTE: starting the test suite", LOG_PREFIX);
+    wxLogMessage("NOTE: starting the test suite");
     wxStopWatch sw;
 
     // Notice that it is safe to use simple variable assignment here instead of
@@ -663,19 +656,18 @@
     TestsResults const results = application_test::instance().run();
     is_running_tests_ = false;
 
-    wxLogMessage("%stime=%ldms (for all tests)", LOG_PREFIX, sw.Time());
+    wxLogMessage("time=%ldms (for all tests)", sw.Time());
 
     if(results.failed == 0)
         {
         if(results.passed == 0)
             {
-            wxLogMessage("%sWARNING: no tests have been executed.", 
LOG_PREFIX);
+            wxLogMessage("WARNING: no tests have been executed.");
             }
         else
             {
             wxLogMessage
-                ("%sSUCCESS: %d test%s successfully completed."
-                ,LOG_PREFIX
+                ("SUCCESS: %d test%s successfully completed."
                 ,results.passed
                 ,results.passed == 1 ? "" : "s"
                 );
@@ -684,8 +676,7 @@
     else
         {
         wxLogMessage
-            ("%sFAILURE: %d out of %d test%s failed."
-            ,LOG_PREFIX
+            ("FAILURE: %d out of %d test%s failed."
             ,results.failed
             ,results.total
             ,results.total == 1 ? "" : "s"
@@ -695,8 +686,7 @@
     if(results.skipped)
         {
         wxLogMessage
-            ("%sNOTE: %s skipped"
-            ,LOG_PREFIX
+            ("NOTE: %s skipped"
             ,results.skipped == 1
                 ? wxString("1 test was")
                 : wxString::Format("%d tests were", results.skipped)




reply via email to

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