]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
New test
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 6 May 2003 16:06:50 +0000 (16:06 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 6 May 2003 16:06:50 +0000 (16:06 +0000)
git-svn-id: https://svn.dealii.org/trunk@7588 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/Makefile
tests/bits/parameter_handler_2.cc [new file with mode: 0644]

index e18d9d154cd2c65452e6a069be2f458d3bd8db45..3abf9c9ad70285d19f3ec8556297d36b84fda12d 100644 (file)
@@ -87,6 +87,7 @@ roy_1.exe               : roy_1.g.$(OBJEXT)                $(libraries)
 denis_1.exe             : denis_1.g.$(OBJEXT)              $(libraries)
 unit_support_points.exe : unit_support_points.g.$(OBJEXT)  $(libraries)
 parameter_handler_1.exe : parameter_handler_1.g.$(OBJEXT)  $(libraries)
+parameter_handler_2.exe : parameter_handler_2.g.$(OBJEXT)  $(libraries)
 
 tests = anna_1 anna_2 anna_3 anna_4 anna_5 anna_6 \
        geometry_info_1 \
@@ -106,7 +107,7 @@ tests = anna_1 anna_2 anna_3 anna_4 anna_5 anna_6 \
        fe_tools_05 fe_tools_06 fe_tools_07 fe_tools_08 \
        roy_1 \
         denis_1 \
-       unit_support_points parameter_handler_1
+       unit_support_points parameter_handler_1 parameter_handler_2
 
 ############################################################
 
diff --git a/tests/bits/parameter_handler_2.cc b/tests/bits/parameter_handler_2.cc
new file mode 100644 (file)
index 0000000..5ef3112
--- /dev/null
@@ -0,0 +1,46 @@
+//----------------------------  parameter_handler_2.cc  ---------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2003 by the deal.II authors and Brent Bayley
+//
+//    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_2.cc  ---------------------------
+
+
+// check the Patterns::List pattern. this particular test failed at
+// one point in time with an assertion due to a pretty stupid bug.
+
+#include <base/logstream.h>
+#include <base/parameter_handler.h>
+#include <fstream>
+
+
+int main () 
+{
+  std::ofstream logfile("parameter_handler_2.output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+
+  ParameterHandler prm;
+  prm.enter_subsection ("Testing");
+  prm.declare_entry ("Function",
+                     "a",
+                     Patterns::List(Patterns::Selection("a|b|c|d|e|f|g|h")));
+  prm.leave_subsection ();
+
+  prm.read_input("parameter_handler_2.prm1");
+
+  std::string list;
+  prm.enter_subsection ("Testing");
+  list = prm.get ("Function");
+  prm.leave_subsection ();
+
+  deallog << list << std::endl;
+  
+  return 0;
+}

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.