changeset 28419:19f4126d26cb stable

uisetfont.m: Manually "graft" BISTs from default to stable. * uisetfont.m: Manually "graft" the BISTs from default after 5147fbf58fa6 and cd86f37bfbc3 to stable.
author Markus Mützel <markus.muetzel@gmx.de>
date Sun, 07 Jun 2020 10:58:03 +0200
parents 1296a89b08f4
children 7987bad47033 da4017484f19
files scripts/gui/uisetfont.m
diffstat 1 files changed, 10 insertions(+), 63 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/gui/uisetfont.m	Tue Jun 02 21:25:59 2020 +0000
+++ b/scripts/gui/uisetfont.m	Sun Jun 07 10:58:03 2020 +0200
@@ -358,66 +358,13 @@
 
 
 ## Test input validation
-%!test
-%! [msg, id] = lasterr ();
-%! unwind_protect
-%!   lasterr ("", "");
-%!   try
-%!     uisetfont (1, 2, 3);
-%!   catch
-%!   end_try_catch
-%!   [~, id] = lasterr ();
-%!   assert (id, "Octave:invalid-fun-call");
-%! unwind_protect_cleanup
-%!   lasterr (msg, id);
-%! end_unwind_protect
-
-%!test
-%! [msg, id] = lasterr ();
-%! unwind_protect
-%!   lasterr ("", "");
-%!   try
-%!     uisetfont (110, struct ());
-%!   catch
-%!   end_try_catch
-%!   [~, id] = lasterr ();
-%!   assert (id, "Octave:invalid-fun-call");
-%! unwind_protect_cleanup
-%!   lasterr (msg, id);
-%! end_unwind_protect
-
-%!test
-%! [msg, id] = lasterr ();
-%! unwind_protect
-%!   lasterr ("", "");
-%!   hf = figure ("visible", "off");
-%!   try
-%!     uisetfont (hf);
-%!   catch
-%!   end_try_catch
-%!   [~, id] = lasterr ();
-%!   assert (id, "Octave:uisetfont:bad-object");
-%! unwind_protect_cleanup
-%!   lasterr (msg, id);
-%!   close (hf);
-%! end_unwind_protect
-
-%!test
-%! [msg, id] = lasterr ();
-%! unwind_protect
-%!   lasterr ("", "");
-%!   hf = figure ("visible", "off");
-%!   hax = axes ();
-%!   try
-%!     uisetfont (hax, 1);
-%!   catch
-%!   end_try_catch
-%!   [~, id] = lasterr ();
-%!   assert (id, "Octave:uisetfont:bad-title");
-%! unwind_protect_cleanup
-%!   lasterr (msg, id);
-%!   close (hf);
-%! end_unwind_protect
-
-%!error <structure must have fields FontName, FontWeight, FontAngle, FontUnits, FontSize>
-%!  uisetfont (struct ());
+%!testif HAVE_FONTCONFIG
+%! fail ("uisetfont (1, 2, 3)", "Invalid call");
+%!testif HAVE_FONTCONFIG
+%! fail ("uisetfont (110, struct ())", "Invalid call");
+%!testif HAVE_FONTCONFIG
+%! fail ("uisetfont (groot ())", "unhandled object type");
+%!testif HAVE_FONTCONFIG
+%! fail ("uisetfont (struct ())", "FONTSTRUCT .* must have fields FontName,.*");
+%!testif HAVE_FONTCONFIG
+%! fail ("uisetfont ({'Title'})", "TITLE must be a character vector");