Mercurial > repos > public > sbplib
diff CellTest.m @ 707:0de70ec8bf60 feature/quantumTriangles
merge with feature/optim
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Fri, 10 Nov 2017 14:22:56 +0100 |
parents | 2ce903f28193 |
children |
line wrap: on
line diff
--- a/CellTest.m Thu Oct 05 18:04:23 2017 +0200 +++ b/CellTest.m Fri Nov 10 14:22:56 2017 +0100 @@ -36,6 +36,21 @@ end end +function testIsEmpty(testCase) + cases = { + {cell(0,0), true}, + {cell(1,0), true}, + {cell(0,1), true}, + {cell(1,1), false}, + }; + + for i = 1:length(cases) + A = Cell(cases{i}{1}); + expected = cases{i}{2}; + testCase.verifyEqual(isempty(A),expected); + end +end + function testTranspose(testCase) testCase.verifyEqual(Cell({1i, 2}).', Cell({1i; 2})); testCase.verifyEqual(Cell({1i; 2}).', Cell({1i, 2}));