From: Luca Heltai Date: Wed, 20 Sep 2017 10:24:57 +0000 (+0200) Subject: Test failing custom format in output. X-Git-Tag: v9.0.0-rc1~1033^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c33e970e83b0678754de32374a8d1ada89f5c1d;p=dealii.git Test failing custom format in output. --- diff --git a/tests/parameter_handler/parameter_acceptor_07.cc b/tests/parameter_handler/parameter_acceptor_07.cc new file mode 100644 index 0000000000..acda6cd341 --- /dev/null +++ b/tests/parameter_handler/parameter_acceptor_07.cc @@ -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 +#include +#include + +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 index 0000000000..e69de29bb2