]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Another test, this time for infinities.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 8 Mar 2006 02:20:44 +0000 (02:20 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 8 Mar 2006 02:20:44 +0000 (02:20 +0000)
git-svn-id: https://svn.dealii.org/trunk@12558 0785d39b-7218-0410-832d-ea1e28bc413d

tests/base/Makefile
tests/base/log_infinity.cc [new file with mode: 0644]
tests/base/log_infinity/cmp/generic [new file with mode: 0644]

index 4740d14a05e0d648f4a1dc39a7ebb491164c86aa..6e5363909c5b9a6ea2ef0fbd8ded8c39775f1680 100644 (file)
@@ -23,7 +23,7 @@ threads.cc : threads.pl
        @$(PERL) $^ > $@
 
 tests_x =  logtest \
-          log_nan \
+          log_* \
           reference \
           quadrature_* qprojector \
           path_search \
diff --git a/tests/base/log_infinity.cc b/tests/base/log_infinity.cc
new file mode 100644 (file)
index 0000000..1bc503e
--- /dev/null
@@ -0,0 +1,34 @@
+//----------------------------  log_infinity.cc  ---------------------------
+//    $Id$
+//    Version: $Name$ 
+//
+//    Copyright (C) 2005, 2006 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//----------------------------  log_infinity.cc  ---------------------------
+
+// similar to log_nan, but test for infinities
+
+#include "../tests.h"
+#include <base/logstream.h>
+#include <fstream>
+#include <iostream>
+
+int main ()
+{
+  std::ofstream logfile("log_infinity/output");
+  logfile.precision(3);
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  deallog << std::numeric_limits<double>::infinity() << std::endl;
+  deallog << -std::numeric_limits<double>::infinity() << std::endl;
+
+  return 0;
+}
+
diff --git a/tests/base/log_infinity/cmp/generic b/tests/base/log_infinity/cmp/generic
new file mode 100644 (file)
index 0000000..6ea40df
--- /dev/null
@@ -0,0 +1,3 @@
+
+DEAL::inf
+DEAL::-inf

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.