]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Filter output of parameter_handler_29 test 17656/head
authorDaniel Arndt <arndtd@ornl.gov>
Tue, 3 Sep 2024 13:45:30 +0000 (09:45 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Wed, 4 Sep 2024 21:51:10 +0000 (17:51 -0400)
tests/parameter_handler/parameter_handler_29.cc
tests/parameter_handler/parameter_handler_29.output
tests/parameter_handler/parameter_handler_29.output.clang-apple [deleted file]

index a8d79bb699bf4d11290f492c99b1d1f550e018f3..e2f2c5652c80a4e7208387241793fd527742f3fa 100644 (file)
@@ -82,7 +82,22 @@ main()
   catch (const ParameterHandler::ExcEncounteredDeprecatedEntries &exc)
     {
       deallog << exc.get_exc_name() << std::endl;
-      exc.print_info(deallog.get_file_stream());
+
+      // Filter out compiler-dependent information
+      std::stringstream tmp;
+      exc.print_info(tmp);
+      std::string filtered_error = tmp.str();
+      size_t      function_begin = filtered_error.find("in function");
+
+      while (function_begin != filtered_error.npos)
+        {
+          size_t additional_begin =
+            filtered_error.find("Additional", function_begin);
+          filtered_error = filtered_error.substr(0, function_begin) + '\n' +
+                           filtered_error.substr(additional_begin);
+          function_begin = filtered_error.find("in function");
+        }
+      deallog << filtered_error;
 
       // Check that the deprecated entries are still accessible.
       prm.enter_subsection("Testing");
index 60600592b98d4cc0abdb7f84771195ac7db6233e..645b901ceab526e4c98ec44fef62e23dd3e0bf89 100644 (file)
@@ -1,23 +1,21 @@
 
 DEAL::ExcEncounteredDeprecatedEntries(deprecation_messages)
-    The following deprecated entries were encountered:
+DEAL::    The following deprecated entries were encountered:
 
 
 --------------------------------------------------------
-An error occurred in file <parameter_handler.cc> in function
-    void dealii::ParameterHandler::scan_line(std::string, const string&, unsigned int, bool)
+An error occurred in file <parameter_handler.cc> 
 Additional information: 
     Line <2> of file <prm/parameter_handler_3.prm>: Entry <string list> is
     deprecated.
 --------------------------------------------------------
 
 --------------------------------------------------------
-An error occurred in file <parameter_handler.cc> in function
-    void dealii::ParameterHandler::scan_line(std::string, const string&, unsigned int, bool)
+An error occurred in file <parameter_handler.cc> 
 Additional information: 
     Line <3> of file <prm/parameter_handler_3.prm>: Entry <int> is
     deprecated.
 --------------------------------------------------------
 
-DEAL::a, b, c
+a, b, c
 DEAL::3
diff --git a/tests/parameter_handler/parameter_handler_29.output.clang-apple b/tests/parameter_handler/parameter_handler_29.output.clang-apple
deleted file mode 100644 (file)
index 9643652..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-
-DEAL::ExcEncounteredDeprecatedEntries(deprecation_messages)
-    The following deprecated entries were encountered:
-
-
---------------------------------------------------------
-An error occurred in file <parameter_handler.cc> in function
-    void dealii::ParameterHandler::scan_line(std::string, const std::string &, const unsigned int, const bool)
-Additional information: 
-    Line <2> of file <prm/parameter_handler_3.prm>: Entry <string list> is
-    deprecated.
---------------------------------------------------------
-
---------------------------------------------------------
-An error occurred in file <parameter_handler.cc> in function
-    void dealii::ParameterHandler::scan_line(std::string, const std::string &, const unsigned int, const bool)
-Additional information: 
-    Line <3> of file <prm/parameter_handler_3.prm>: Entry <int> is
-    deprecated.
---------------------------------------------------------
-
-DEAL::a, b, c
-DEAL::3

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.