changeset 27490:19ba2619d746

More informative warning message when range expression has a complex number (bug #56959). * ov.cc (do_colon_op): Change warning message. * parser.tst: Update BIST tests for bug #56959.
author Rik <rik@octave.org>
date Sun, 13 Oct 2019 09:30:52 -0700
parents c2c9185d3389
children bea2823affa4
files libinterp/octave-value/ov.cc test/parser.tst
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/octave-value/ov.cc	Sat Oct 12 17:33:28 2019 -0700
+++ b/libinterp/octave-value/ov.cc	Sun Oct 13 09:30:52 2019 -0700
@@ -2552,7 +2552,7 @@
 
       if (base.iscomplex () || limit.iscomplex ()
           || (increment.is_defined () && increment.iscomplex ()))
-        warning ("complex portion of colon arguments is ignored");
+        warning ("imaginary part of complex colon arguments is ignored");
 
       Matrix m_base, m_limit, m_increment;
 
--- a/test/parser.tst	Sat Oct 12 17:33:28 2019 -0700
+++ b/test/parser.tst	Sun Oct 13 09:30:52 2019 -0700
@@ -354,7 +354,7 @@
 %! assert (x == 0);
 
 %!test <*56959>
-%! fail ("i:5", "warning", "complex portion of colon arguments is ignored");
-%! fail ("1:5*i", "warning", "complex portion of colon arguments is ignored");
-%! fail ("1:i:5", "warning", "complex portion of colon arguments is ignored");
+%! fail ("i:5", "warning", "imaginary part of complex colon arguments is ignored");
+%! fail ("1:5*i", "warning", "imaginary part of complex colon arguments is ignored");
+%! fail ("1:i:5", "warning", "imaginary part of complex colon arguments is ignored");