Mercurial > octave
changeset 32040:ba0596c25479
inputParser.m: Fix BIST tests designed to test addParamValue method.
* inputParser.m: BIST tests that were supposed to test addParamValue method
were actually using addParameter method.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 19 Apr 2023 17:04:14 -0700 |
parents | 01868cd10060 |
children | b4fbbd9cf601 |
files | scripts/miscellaneous/inputParser.m |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/miscellaneous/inputParser.m Wed Apr 19 17:02:20 2023 -0700 +++ b/scripts/miscellaneous/inputParser.m Wed Apr 19 17:04:14 2023 -0700 @@ -874,14 +874,14 @@ ## addParameter but they use the same codepath. %!test %! p = inputParser (); -%! addParameter (p, "line", "tree", @(x) any (strcmp (x, {"tree", "circle"}))); -%! addParameter (p, "color", "red", @(x) any (strcmp (x, {"red", "green"}))); +%! addParamValue (p, "line", "tree", @(x) any (strcmp (x, {"tree", "circle"}))); +%! addParamValue (p, "color", "red", @(x) any (strcmp (x, {"red", "green"}))); %! p.parse ("line", "circle"); %! assert ({p.Results.line, p.Results.color}, {"circle", "red"}); %!test %! p = inputParser (); -%! p.addParameter ("foo", "bar", @ischar); +%! p.addParamValue ("foo", "bar", @ischar); %! p.parse (); %! assert (p.Results, struct ("foo", "bar")); %! p.parse ("foo", "qux");