Mercurial > octave
comparison libinterp/octave-value/ov-cell.cc @ 32060:1203a2d81a42
Add BIST tests for Matlab compatibility for functions which accept negative dimensions.
* data.cc (Fones, Finf, Feps, Feye): Add BIST test for negative dimensions.
* rand.cc (Frand): Add BIST test for negative dimensions.
* ov-cell.cc (Fcell): Add BIST test for negative dimensions.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 26 Apr 2023 16:26:32 -0700 |
parents | 53c10d69a9be |
children | 4d6615bca5b4 |
comparison
equal
deleted
inserted
replaced
32059:bade9602c5a1 | 32060:1203a2d81a42 |
---|---|
1284 | 1284 |
1285 return ovl (Cell (dims)); | 1285 return ovl (Cell (dims)); |
1286 } | 1286 } |
1287 | 1287 |
1288 /* | 1288 /* |
1289 ## Note: Matlab compatibility requires using 0 for negative dimensions. | |
1290 %!assert (size (cell (2, -3)), [2, 0]) | |
1289 | 1291 |
1290 %!test <*63132> | 1292 %!test <*63132> |
1291 %! x = {1, 3}; | 1293 %! x = {1, 3}; |
1292 %! y = cell (x); | 1294 %! y = cell (x); |
1293 %! assert (x, y); | 1295 %! assert (x, y); |