]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add failing test for deallog
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 14 Sep 2012 16:26:38 +0000 (16:26 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 14 Sep 2012 16:26:38 +0000 (16:26 +0000)
git-svn-id: https://svn.dealii.org/trunk@26388 0785d39b-7218-0410-832d-ea1e28bc413d

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

diff --git a/tests/base/log_crash_01.cc b/tests/base/log_crash_01.cc
new file mode 100644 (file)
index 0000000..8057f59
--- /dev/null
@@ -0,0 +1,38 @@
+//----------------------------  logtest.cc  ---------------------------
+//    $Id: logtest.cc 23710 2011-05-17 04:50:10Z bangerth $
+//    Version: $Name$ 
+//
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007 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.
+//
+//----------------------------  logtest.cc  ---------------------------
+
+
+// document crash in deallog related to missing newline
+
+
+#include "../tests.h"
+#include <deal.II/base/logstream.h>
+#include <fstream>
+#include <iomanip>
+#include <limits>
+
+
+int main()
+{
+  std::ofstream logfile("log_crash_01/output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+
+  deallog.push("1");
+  {
+  deallog.threshold_double(1.e-10);
+  deallog.push("2");
+  deallog << "no newline here!";
+  deallog.pop();
+  }
+}
diff --git a/tests/base/log_crash_01/cmp/generic b/tests/base/log_crash_01/cmp/generic
new file mode 100644 (file)
index 0000000..035550a
--- /dev/null
@@ -0,0 +1,7 @@
+
+DEAL::Test
+DEAL:l1::Test1
+DEAL:l1:l2::Test2Test3
+DEAL:l1:l2::Test4Test5
+DEAL:l1::Test6
+DEAL::Test7

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.