changeset 30590:50bf281760e0

inv: Add BIST tests for new input validation in cset 3b2558676d0e (bug #61728) * inv.cc (Finv): Add BIST for incorrect argument type.
author Rik <rik@octave.org>
date Mon, 03 Jan 2022 13:02:52 -0800
parents 913f765057d9
children 2f1fae9dd79d
files libinterp/corefcn/inv.cc
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/inv.cc	Mon Jan 03 11:49:05 2022 -0800
+++ b/libinterp/corefcn/inv.cc	Mon Jan 03 13:02:52 2022 -0800
@@ -376,8 +376,10 @@
 %!       "warning", "matrix singular");
 %! assert (A, sparse ([Inf, 0, 0; 0, 0, 0; 0, 0, Inf]));
 
-%!error inv ()
-%!error inv ([1, 2; 3, 4], 2)
+%!error <Invalid call> inv ()
+%!error <Invalid call> inv ([1, 2; 3, 4], 2)
+%!error <wrong type argument> inv ("Hello World")
+%!error <wrong type argument> inv ({1})
 %!error <must be a square matrix> inv ([1, 2; 3, 4; 5, 6])
 %!error <inverse of the null matrix not defined> inv (sparse (2, 2, 0))
 %!error <inverse of the null matrix not defined> inv (diag ([0, 0]))