changeset 32015:652a8eb4821f

Fix failing BIST tests caused by cset e2ad5720b29e. * inputParser.m: Wrap argument name in single quotes ('ARG') in error messages. Change BIST tests to match new expected string output. * odeset.m: Change BIST tests to pass with new error string format.
author Rik <rik@octave.org>
date Fri, 14 Apr 2023 12:09:01 -0700
parents e2ad5720b29e
children 61b86eaefe80
files scripts/miscellaneous/inputParser.m scripts/ode/odeset.m
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/miscellaneous/inputParser.m	Fri Apr 14 08:34:40 2023 -0700
+++ b/scripts/miscellaneous/inputParser.m	Fri Apr 14 12:09:01 2023 -0700
@@ -453,7 +453,7 @@
             vidx -= 1;
             break;
           else
-            this.error (sprintf (["failed validation of %s\n", ...
+            this.error (sprintf (["failed validation of '%s'\n", ...
                                   "Validation function: %s"],
                                  opt.name, disp (opt.val)));
           endif
@@ -575,7 +575,7 @@
         endif
       end_try_catch
       if (! ok)
-        this.error (sprintf ("failed validation of %s.  %s", name, err));
+        this.error (sprintf ("failed validation of '%s'.  %s", name, err));
       endif
       this.Results.(name) = in;
 
@@ -845,7 +845,7 @@
 %! p.addOptional ("op1", "val1", @ischar);
 %! p.addOptional ("op2", "val2", @isnumeric);
 %! p.addParameter ("line", "circle", @ischar);
-%! fail ('p.parse ("line", 89)', "failed validation of LINE")
+%! fail ('p.parse ("line", 89)', "failed validation of 'line'")
 %!
 %! p = inputParser ();
 %! p.addOptional ("op1", "val1");
@@ -889,7 +889,7 @@
 %! assert (p.Unmatched, struct ());
 
 ## Test for patch #9241
-%!error <failed validation of A.*ischar>
+%!error <failed validation of 'a'.*ischar>
 %! p = inputParser ();
 %! p.addParameter ("a", [], @ischar);
 %! p.parse ("a", 1);
--- a/scripts/ode/odeset.m	Fri Apr 14 08:34:40 2023 -0700
+++ b/scripts/ode/odeset.m	Fri Apr 14 12:09:01 2023 -0700
@@ -287,7 +287,7 @@
 ## %!error <Possible fields found: InitialSlope, InitialStep> odeset ("Initial", 1)
 
 ## Test input validation
-%!error <argument 'OPT1' is not a valid parameter> odeset ("opt1")
+%!error <argument 'opt1' is not a valid parameter> odeset ("opt1")
 %!error odeset (1, 1)
-%!error <argument 'OPT1' is not a valid parameter> odeset (odeset (), "opt1")
+%!error <argument 'opt1' is not a valid parameter> odeset (odeset (), "opt1")
 %!error odeset (odeset (), 1, 1)