octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #51308] ndims, rows, columns in correct for cl


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #51308] ndims, rows, columns in correct for classes that only overload size
Date: Sat, 24 Jun 2017 19:57:06 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0

URL:
  <http://savannah.gnu.org/bugs/?51308>

                 Summary: ndims, rows, columns in correct for classes that
only overload size
                 Project: GNU Octave
            Submitted by: jwe
            Submitted on: Sat 24 Jun 2017 11:57:04 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: jwe
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

This problem already has tests in the test/classes/classes.tst file.  If there
is a bug report specifically for this issue, I couldn't find it.  But #44334
mentions this problem, but it is closed as fixed, so it seems better to me to
open a new report instead of reopen that one.

The test are the xtests from the following blocks in classes.tst.  They
require the SizeTester class that is also already a part of the test suite.


%!test st = SizeTester ([1 2]);
%! assert (isequal (size (st), [1 2]));
%! assert (isequal (numel (st), 2));
%!assert (isequal (ndims (st), 2))
%!assert (isequal (rows (st), 1))
%!assert (isequal (columns (st), 2))
%!assert <*44334> (isequal (st, st))
%!assert <44498> (not (isscalar (st)))
%!assert (isvector (st))

%!test st = SizeTester ([2 3]);
%! assert (isequal (size (st), [2 3]));
%! assert (isequal (numel (st), 6));
%!assert (isequal (ndims (st), 2))
%!xtest assert (isequal (rows (st), 2))
%!xtest assert (isequal (columns (st), 3))
%!assert <*44334> (isequal (st, st))
%!assert <44498> (not (isscalar (st)))
%!assert <44498> (not (isvector (st)))

%!test st = SizeTester ([2 3 4]);
%! assert (isequal (size (st), [2 3 4]));
%! assert (isequal (numel (st), 24));
%!xtest assert (isequal (ndims (st), 3))
%!xtest assert (isequal (rows (st), 2))
%!xtest assert (isequal (columns (st), 3))
%!assert <*44334> (isequal (st, st))
%!assert <44498> (not (isscalar (st)))
%!assert <44498> (not (isvector (st)))


I'll tag with a bug number once this report is submitted.





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51308>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]