]> https://gitweb.dealii.org/ - dealii.git/commitdiff
New test.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 8 Sep 2010 14:24:38 +0000 (14:24 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 8 Sep 2010 14:24:38 +0000 (14:24 +0000)
git-svn-id: https://svn.dealii.org/trunk@21880 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/parameter_handler_12.cc [new file with mode: 0644]
tests/bits/parameter_handler_12/cmp/generic [new file with mode: 0644]
tests/bits/parameter_handler_12/prm [new file with mode: 0644]

diff --git a/tests/bits/parameter_handler_12.cc b/tests/bits/parameter_handler_12.cc
new file mode 100644 (file)
index 0000000..acc9445
--- /dev/null
@@ -0,0 +1,43 @@
+//----------------------------  parameter_handler_12.cc  ---------------------------
+//    $Id$
+//    Version: $Name$ 
+//
+//    Copyright (C) 2002, 2003, 2004, 2005, 2010 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.
+//
+//----------------------------  parameter_handler_12.cc  ---------------------------
+
+
+// testing reading a parameter that doesn't conform to its specs. this
+// incidentally also uncovered a bug in Patterns::Integer::match
+
+#include "../tests.h"
+#include <base/logstream.h>
+#include <base/parameter_handler.h>
+#include <fstream>
+
+void check ()
+{
+  ParameterHandler prm;
+  prm.declare_entry ("test_1", "3", Patterns::Integer());
+
+  prm.set ("test_1", "3.1415");
+  deallog << "test_1=" << prm.get ("test_1") << std::endl;
+}
+
+
+int main () 
+{
+  std::ofstream logfile("parameter_handler_12/output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  check ();
+  
+  return 0;
+}
diff --git a/tests/bits/parameter_handler_12/cmp/generic b/tests/bits/parameter_handler_12/cmp/generic
new file mode 100644 (file)
index 0000000..cbd1572
--- /dev/null
@@ -0,0 +1,3 @@
+
+DEAL::0
+DEAL::test_1=3
diff --git a/tests/bits/parameter_handler_12/prm b/tests/bits/parameter_handler_12/prm
new file mode 100644 (file)
index 0000000..717e46d
--- /dev/null
@@ -0,0 +1 @@
+set test_1 = 3.1415

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.