Mercurial > hg > octave-lyh
changeset 15762:a5475ba0d199
test.m: Better error reporting for arguments that can't be tested (bug #37592)
* test.m: Add more specific error messages for types that can't be tested. Tests
and error messages borrowed from type.m.
author | Mike Miller <mtmiller@ieee.org> |
---|---|
date | Sun, 09 Dec 2012 18:27:58 -0500 |
parents | 9f3656ada658 |
children | 56239ff815a3 |
files | scripts/testfun/test.m |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/testfun/test.m +++ b/scripts/testfun/test.m @@ -173,8 +173,15 @@ __ret1 = ""; __ret2 = -1; else - if (exist (__name) == 3) + ftype = exist (__name); + if (ftype == 3) fprintf (__fid, "%s%s source code with tests for dynamically linked function not found\n", __signal_empty, __name); + elseif (ftype == 5) + fprintf (__fid, "%s%s is a built-in function\n", __signal_empty, __name); + elseif (any (strcmp (__operators__ (), __name))) + fprintf (__fid, "%s%s is an operator\n", __signal_empty, __name); + elseif (any (strcmp (__keywords__ (), __name))) + fprintf (__fid, "%s%s is a keyword\n", __signal_empty, __name); else fprintf (__fid, "%s%s does not exist in path\n", __signal_empty, __name); endif