]> https://gitweb.dealii.org/ - dealii.git/commitdiff
tests: Fix up a couple of tests that didn't take the last commit lightly 4780/head
authorMatthias Maier <tamiko@43-1.org>
Fri, 11 Aug 2017 04:20:07 +0000 (23:20 -0500)
committerMatthias Maier <tamiko@43-1.org>
Fri, 11 Aug 2017 04:20:07 +0000 (23:20 -0500)
tests/base/is_finite.cc
tests/base/is_finite_complex.cc
tests/base/log_nan.cc
tests/base/polynomial_minus_equals.cc
tests/codim_one/integrate_one_over_r_telles.cc
tests/hp/step-27.cc
tests/integrators/maxwell_curl.cc
tests/lac/constraints_c1.cc
tests/multigrid/mg_renumbered_01.cc

index c5c2325f61995c44c37fab57f56da47c713d9af5..96ba2548c812d2a3253c3ac85d3a741f9f48ad69 100644 (file)
@@ -17,7 +17,9 @@
 // check numbers::is_finite
 
 #include "../tests.h"
+
 #include <limits>
+#include <cfenv>
 
 
 template <typename T>
index bf7a9d7a37630a8b209d3c5c7fcc99ec3d0710c1..869cfcc3a9cb4bd1f822f4884103fe55ed67b117 100644 (file)
@@ -17,7 +17,9 @@
 // check numbers::is_finite for complex arguments
 
 #include "../tests.h"
+
 #include <limits>
+#include <cfenv>
 
 
 template <typename T>
index 240e4e3995ad5b6cc994185d53b9a420a4e48ec0..3b204f912162a09d1edc7417141c020ac45d0ab7 100644 (file)
@@ -18,7 +18,9 @@
 // list. the test should actually output "nan", but prints "0"
 
 #include "../tests.h"
+
 #include <limits>
+#include <cfenv>
 
 int main ()
 {
index 1b27c8e54c3ebdfae1f8e5899bf48614ca7f8269..ba1e41834abce26e868bbeb8a6992cecf565a5d5 100644 (file)
@@ -18,6 +18,8 @@
 //
 // check on the Polynomial::operator -=
 
+#include "../tests.h"
+
 #include <deal.II/base/polynomial.h>
 
 #include <iostream>
@@ -28,9 +30,8 @@ using namespace dealii;
 
 int main ()
 {
-  std::ofstream logfile("output");
+  initlog();
   deallog << std::setprecision(3);
-  deallog.attach(logfile);
 
   //      subtract two equal polynomials up to order p_dim
   //      the result evaluated at an arbitrary point
index 8c7bee3cfbd6a7ea79277ade4142cc2e6041c81a..3d9c59f56dec315ec9223a603b2f9a8c97fafd36 100644 (file)
@@ -1,6 +1,4 @@
 // ---------------------------------------------------------------------
-// $Id: integrate_one_over_r.cc 30338 2013-08-18 22:02:27Z heltai $
-//
 // Copyright (C) 2005 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
@@ -14,6 +12,8 @@
 //
 // ---------------------------------------------------------------------
 
+#include "../tests.h"
+
 // integrates the function *f(x,y)/R, where f(x,y) is a power of x and
 // y on the set [0,1]x[0,1]. dim = 2 only.
 
@@ -26,8 +26,6 @@
 
 #include <string>
 
-#include <math.h>
-
 using namespace std;
 using namespace dealii;
 
@@ -39,12 +37,10 @@ exact_integral_one_over_r (
   const unsigned int i, const unsigned int j,
   const unsigned int vertex_index);
 
-ofstream logfile("output");
-
 int
 main ()
 {
-  deallog.attach(logfile);
+  initlog();
   deallog << std::fixed;
 
   deallog << endl
index 7b3de5f80d396ce305b1fdbf630deee2c387dea6..c2d02527a676e6e46d933c2535078bd5eb5cd1d9 100644 (file)
@@ -50,6 +50,7 @@
 
 #include <iostream>
 #include <complex>
+#include <fstream>
 
 
 namespace Step27
index f63da24bcf631cdc2b515677d5b33371d292227e..d525ec60713787919c454d52d0bf9884ae3a5690 100644 (file)
@@ -18,8 +18,7 @@
 
 // Test curl related functions in integrators/maxwell.h
 
-#include <cstring>
-#include <iostream>
+#include "../tests.h"
 
 #include <deal.II/grid/grid_generator.h>
 #include <deal.II/grid/tria.h>
@@ -96,10 +95,7 @@ void TestMaxwellCurl(Triangulation<dim> &tr)
 
 int main()
 {
-  const std::string logname = "output";
-  std::ofstream logfile(logname.c_str());
-  deallog.attach(logfile);
-  deallog.threshold_double(1.e-10);
+  initlog();
 
   Triangulation<3> tr;
   make_grid(tr);
index cf7ac994d91a170956cf6b59e96a565b22248aa3..40ab873732332be0b414c784d52aa1c20e9c7cb0 100644 (file)
@@ -23,6 +23,7 @@
 // This is because it contains a cycle. The test now checks that this
 // is detected.
 
+#include "../tests.h"
 
 #include <deal.II/base/job_identifier.h>
 #include <deal.II/grid/grid_generator.h>
@@ -30,8 +31,6 @@
 #include <deal.II/fe/fe_q.h>
 #include <deal.II/dofs/dof_tools.h>
 
-#include <iostream>
-
 using namespace dealii;
 
 template <int dim>
@@ -167,10 +166,7 @@ run(const FiniteElement<dim> &fe)
 int main()
 {
   deal_II_exceptions::disable_abort_on_exception();
-
-  const std::string logname = "output";
-  std::ofstream logfile(logname.c_str());
-  deallog.attach(logfile);
+  initlog();
 
   FE_Q<2> fe(3);
   run(fe);
index 883871de81b42650f2d8aa9d0d7b3fee0b5194cb..d6a413b80fc79ffa604fde99e80ef90e8ae01652 100644 (file)
@@ -13,6 +13,7 @@
 //
 // ---------------------------------------------------------------------
 
+#include "../tests.h"
 
 #include <deal.II/base/quadrature_lib.h>
 #include <deal.II/base/function.h>
@@ -474,10 +475,8 @@ void LaplaceProblem<dim>::run ()
 
 int main ()
 {
-  std::ofstream logfile("output");
+  initlog();
   deallog << std::setprecision(4);
-  deallog.attach(logfile);
-  deallog.threshold_double(1.e-10);
 
   LaplaceProblem<2> laplace_problem_2d(1);
   laplace_problem_2d.run ();

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.