# HG changeset patch # User Carnë Draug # Date 1470539898 -3600 # Node ID a4551d2b5da5f73599e4a8a34c9fbe400db95618 # Parent 1723063e65f3b7598f3e5a690f0e85025cca3eb0 repmat.m: add test for input with zero length dimensions. diff -r 1723063e65f3 -r a4551d2b5da5 scripts/general/repmat.m --- a/scripts/general/repmat.m Sat Aug 06 05:18:34 2016 +0100 +++ b/scripts/general/repmat.m Sun Aug 07 04:18:18 2016 +0100 @@ -204,6 +204,9 @@ %!assert (size (repmat (1, [0, 1])), [0, 1]) %!assert (size (repmat (1, [0, 5])), [0, 5]) +%!assert (size (repmat (ones (0, 3), [2 3])), [0 9]) +%!assert (size (repmat (ones (0, 0, 3), [2 3])), [0 0 3]) + %!shared x %! x = struct ("a", [], "b", []); %!assert (size (repmat (x, [1, 0])), [1, 0]) @@ -217,4 +220,3 @@ %!assert (size (repmat ({1}, [0, 5])), [0, 5]) %!error (size (repmat (".", -1, -1))) -