Mercurial > octave
changeset 28028:79b583e31590
Segregate remaining failing rats() tests in to BIST test for bug #57704.
* pr-output.cc (Frats): New %!xtest for bug #57704 with two tests.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 30 Jan 2020 18:07:29 -0800 |
parents | 2e6dc7e2b191 |
children | f80710dd61b6 |
files | libinterp/corefcn/pr-output.cc |
diffstat | 1 files changed, 11 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/pr-output.cc Thu Jan 30 17:43:56 2020 -0800 +++ b/libinterp/corefcn/pr-output.cc Thu Jan 30 18:07:29 2020 -0800 @@ -3291,15 +3291,10 @@ %! [old_fmt, old_spacing] = format (); %! unwind_protect %! format short; -%! assert (rats (2.0005, 9), "4001/2000"); %! assert (rats (-2.0005, 10), "-4001/2000"); %! assert (strtrim (rats (2.0005, 30)), "4001/2000"); %! assert (pi - str2num (rats (pi, 30)), 0, 4 * eps); %! assert (e - str2num (rats (e, 30)), 0, 4 * eps); -%! assert (rats (123, 2), " *"); -%! v = 1 / double (intmax); -%! err = v - str2num (rats (v, 12)); -%! assert (err, 0, 4 * eps); %! unwind_protect_cleanup %! format (old_fmt); %! format (old_spacing); @@ -3314,6 +3309,17 @@ %!assert <*57004> (rats ([]), '') +%!xtest <57704> +%! [old_fmt, old_spacing] = format (); +%! unwind_protect +%! format short; +%! assert (rats (2.0005, 9), "4001/2000"); +%! assert (rats (123, 2), " *"); +%! unwind_protect_cleanup +%! format (old_fmt); +%! format (old_spacing); +%! end_unwind_protect + */ DEFUN (disp, args, nargout,