changeset 19260:cdfc8bc9ab62

gallery.m: Add BIST tests for central dispatch function. * gallery.m: Add BIST tests for central dispatch function.
author Rik <rik@octave.org>
date Mon, 06 Oct 2014 08:40:48 -0700
parents ec037d41da06
children 7315760b9045
files scripts/special-matrix/gallery.m
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/special-matrix/gallery.m	Mon Oct 06 06:52:20 2014 -0400
+++ b/scripts/special-matrix/gallery.m	Mon Oct 06 08:40:48 2014 -0700
@@ -2855,3 +2855,15 @@
   endif
 endfunction
 
+
+## BIST testing for just a few functions to verify that the main gallery
+## dispatch function works.
+%assert (gallery ("clement", 3), [0 1 0; 2 0 2; 0 1 0])
+%assert (gallery ("invhess", 2), [1 -1; 1 2])
+
+## Test input validation of main dispatch function only
+%!error gallery ()
+%!error <NAME must be a string> gallery (123)
+%!error <matrix binomial not implemented> gallery ("binomial")
+%!error <unknown matrix with NAME foobar> gallery ("foobar")
+