changeset 32682:f030e572b715

graphics.cc: Add BIST for default colormap (bug #65010). * graphics.cc: Add BIST to verify that a new figure's colormap matches viridis(256).
author Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
date Tue, 02 Jan 2024 23:10:12 -0500
parents ea5158206032
children d338695e2823 97a9293f25f8
files libinterp/corefcn/graphics.cc
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc	Tue Jan 02 17:37:01 2024 -0800
+++ b/libinterp/corefcn/graphics.cc	Tue Jan 02 23:10:12 2024 -0500
@@ -412,6 +412,18 @@
   return cmap;
 }
 
+/*
+## Test default colormap returns as 256 color viridis
+%!test
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   hax = axes ("parent", hf);
+%!   assert (get (hax, "colormap"), viridis (256), eps);   
+%! unwind_protect_cleanup
+%!   delete (hf);
+%! end_unwind_protect
+*/
+
 static double
 default_screendepth ()
 {