From: David Wells Date: Thu, 28 Jan 2021 02:40:47 +0000 (-0500) Subject: Shorten a test suite function. X-Git-Tag: v9.3.0-rc1~524^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c586169f7c44a03b327dafb226ab5a953b13d94;p=dealii.git Shorten a test suite function. --- diff --git a/tests/parameter_handler/parameter_acceptor_09.output b/tests/parameter_handler/parameter_acceptor_09.output index f2d1ef7108..5dda9338fa 100644 --- a/tests/parameter_handler/parameter_acceptor_09.output +++ b/tests/parameter_handler/parameter_acceptor_09.output @@ -11,7 +11,6 @@ end DEAL::Generate and read input.xml 0, 0, 00, 0, 01[List of <[Double -MAX_DOUBLE...MAX_DOUBLE (inclusive)]> of length 3...3 (inclusive)]0,1 - DEAL::Generate and read input.json { "Test": diff --git a/tests/parameter_handler/parameter_handler_27.output b/tests/parameter_handler/parameter_handler_27.output index ddc73783bd..890ec1bca0 100644 --- a/tests/parameter_handler/parameter_handler_27.output +++ b/tests/parameter_handler/parameter_handler_27.output @@ -15,7 +15,6 @@ DEAL::XML format: DEAL::======================================== truetrue1[Bool]1110[Double -MAX_DOUBLE...MAX_DOUBLE (inclusive)]0CiaoCiao2[Anything]2 - DEAL::JSON format: DEAL::======================================== { diff --git a/tests/parameter_handler/parameter_handler_28.output b/tests/parameter_handler/parameter_handler_28.output index 95b96fa393..2ed6063af1 100644 --- a/tests/parameter_handler/parameter_handler_28.output +++ b/tests/parameter_handler/parameter_handler_28.output @@ -10,7 +10,6 @@ DEAL::ShortXML format: DEAL::======================================== 12 - DEAL::ShortJSON format: DEAL::======================================== { diff --git a/tests/tests.h b/tests/tests.h index 660088d293..cde2db56e7 100644 --- a/tests/tests.h +++ b/tests/tests.h @@ -288,16 +288,11 @@ random_box(const double &min = 0.0, const double &max = 1.0) void cat_file(const char *filename) { - std::ifstream in(filename); - Assert(in, dealii::ExcIO()); - - while (in) - { - std::string s; - std::getline(in, s); - dealii::deallog.get_file_stream() << s << "\n"; - } - in.close(); + { + std::ifstream in(filename); + Assert(in, dealii::ExcIO()); + deallog.get_file_stream() << in.rdbuf() << "\n"; + } std::remove(filename); }