Mercurial > hg > octave-nkf
changeset 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 | 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 +++ 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") +