From 1cae6134270c979d5a7dfea084f12f3cdde4473f Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 24 Apr 2017 11:20:56 -0600 Subject: [PATCH] Convert tests to use ParameterHandler::parse_input(). This test also requires not to use the old semantics of creating input files that don't exist. --- tests/parameter_handler/parameter_handler_14.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/parameter_handler/parameter_handler_14.cc b/tests/parameter_handler/parameter_handler_14.cc index 1b82b82253..ee99026255 100644 --- a/tests/parameter_handler/parameter_handler_14.cc +++ b/tests/parameter_handler/parameter_handler_14.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2002 - 2016 by the deal.II authors +// Copyright (C) 2002 - 2017 by the deal.II authors // // This file is part of the deal.II library. // @@ -26,6 +26,10 @@ void check () { + std::string input = "subsection bar\n" + " set value = 1.0\n" + "end\n"; + ParameterHandler foo; foo.enter_subsection("bar"); foo.declare_entry("value", "1.0", dealii::Patterns::Double(), ""); @@ -33,7 +37,7 @@ void check () try { - foo.parse_input("tmp.prm"); + foo.parse_input_from_string(input.c_str()); } catch (...) { @@ -44,9 +48,6 @@ void check () foo.enter_subsection("bar"); deallog << foo.get ("value") << std::endl; foo.leave_subsection(); - - // delete tmp file again - std::remove("tmp.prm"); } -- 2.39.5