Mercurial > hg > octave-nkf
diff scripts/special-matrix/gallery.m @ 19418: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 | 0850b5212619 |
children | 0e1f5a750d00 |
line wrap: on
line diff
--- a/scripts/special-matrix/gallery.m +++ b/scripts/special-matrix/gallery.m @@ -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") +