]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Test failing custom format in output.
authorLuca Heltai <luca.heltai@sissa.it>
Wed, 20 Sep 2017 10:24:57 +0000 (12:24 +0200)
committerLuca Heltai <luca.heltai@sissa.it>
Tue, 26 Sep 2017 17:19:24 +0000 (19:19 +0200)
tests/parameter_handler/parameter_acceptor_07.cc [new file with mode: 0644]
tests/parameter_handler/parameter_acceptor_07.expect=run.output [new file with mode: 0644]

diff --git a/tests/parameter_handler/parameter_acceptor_07.cc b/tests/parameter_handler/parameter_acceptor_07.cc
new file mode 100644 (file)
index 0000000..acda6cd
--- /dev/null
@@ -0,0 +1,69 @@
+//-----------------------------------------------------------
+//
+//    Copyright (C) 2015 by the deal.II authors
+//
+//    This file is part of the deal.II library.
+//
+//    The deal.II library is free software; you can use it, redistribute
+//    it, and/or modify it under the terms of the GNU Lesser General
+//    Public License as published by the Free Software Foundation; either
+//    version 2.1 of the License, or (at your option) any later version.
+//    The full text of the license can be found in the file LICENSE at
+//    the top level of the deal.II distribution.
+//
+//-----------------------------------------------------------
+
+
+
+#include "../tests.h"
+#include <deal.II/base/path_search.h>
+#include <deal.II/base/utilities.h>
+#include <deal.II/base/parameter_acceptor.h>
+
+class FirstClass : public ParameterAcceptor
+{
+public:
+  FirstClass(const std::string &name = "First Class"):
+    ParameterAcceptor(name)
+  {
+    add_parameter("First int",   f_i);
+    add_parameter("First double",f_d);
+    add_parameter("First bool",  f_b);
+    add_parameter("First string",f_s);
+  };
+
+private:
+  int         f_i = 3;
+  double      f_d = 7.7;
+  bool        f_b = true;
+  std::string f_s = "hello";
+};
+
+class SecondClass : public ParameterAcceptor
+{
+public:
+  SecondClass(const std::string &name = "Second Class"):
+    ParameterAcceptor(name)
+  {
+    add_parameter("Second int",   s_i);
+    add_parameter("Second double",s_d);
+    add_parameter("Second bool",  s_b);
+    add_parameter("Second string",s_s);
+  };
+
+private:
+  int         s_i = 5;
+  double      s_d = 9.9;
+  bool        s_b = false;
+  std::string s_s = "bye bye";
+};
+
+int main ()
+{
+  initlog();
+
+  FirstClass  f;
+  SecondClass s;
+  std::string output_name = "used_parameter_acceptor_07.custom";
+  ParameterAcceptor::initialize(SOURCE_DIR "/parameter_acceptor_parameters/parameter_acceptor_05.prm", output_name);
+}
diff --git a/tests/parameter_handler/parameter_acceptor_07.expect=run.output b/tests/parameter_handler/parameter_acceptor_07.expect=run.output
new file mode 100644 (file)
index 0000000..e69de29

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.