]> https://gitweb.dealii.org/ - dealii.git/commitdiff
tests: restore option to print to console with deallog 2446/head
authorTimo Heister <timo.heister@gmail.com>
Sun, 3 Apr 2016 08:35:50 +0000 (10:35 +0200)
committerTimo Heister <timo.heister@gmail.com>
Sun, 3 Apr 2016 08:35:50 +0000 (10:35 +0200)
The recent change to the default of deallog.depth_console (now 0) broke
the bool console parameter to the various init() functions used in
tests. Restore this feature.

tests/tests.h

index 086ef88cab3a1d35de85898623ce67f553bc1048..7a1dd16a803f385230220dc2efc40fd65e2c2945 100644 (file)
@@ -309,8 +309,7 @@ initlog(bool console=false)
   deallogname = "output";
   deallogfile.open(deallogname.c_str());
   deallog.attach(deallogfile);
-  if (!console)
-    deallog.depth_console(0);
+  deallog.depth_console(console?10:0);
 
 //TODO: Remove this line and replace by test_mode()
   deallog.threshold_float(1.e-8);
@@ -328,8 +327,7 @@ mpi_initlog(bool console=false)
       deallogname = "output";
       deallogfile.open(deallogname.c_str());
       deallog.attach(deallogfile);
-      if (!console)
-        deallog.depth_console(0);
+      deallog.depth_console(console?10:0);
 
 //TODO: Remove this line and replace by test_mode()
       deallog.threshold_float(1.e-8);
@@ -355,8 +353,7 @@ struct MPILogInitAll
       deallogname = deallogname + Utilities::int_to_string(myid);
     deallogfile.open(deallogname.c_str());
     deallog.attach(deallogfile);
-    if (!console)
-      deallog.depth_console(0);
+    deallog.depth_console(console?10:0);
 
 //TODO: Remove this line and replace by test_mode()
     deallog.threshold_float(1.e-8);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.