comparison CellTest.m @ 581:00261f8d7e15 feature/grids

Merge default
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 07 Sep 2017 09:54:45 +0200
parents 2ce903f28193
children
comparison
equal deleted inserted replaced
579:a5f1b0267dba 581:00261f8d7e15
31 for i = 1:length(cases) 31 for i = 1:length(cases)
32 A = Cell(cases{i}{1}); 32 A = Cell(cases{i}{1});
33 expected = cases{i}{2}; 33 expected = cases{i}{2};
34 34
35 testCase.verifyEqual(length(A),expected); 35 testCase.verifyEqual(length(A),expected);
36 end
37 end
38
39 function testIsEmpty(testCase)
40 cases = {
41 {cell(0,0), true},
42 {cell(1,0), true},
43 {cell(0,1), true},
44 {cell(1,1), false},
45 };
46
47 for i = 1:length(cases)
48 A = Cell(cases{i}{1});
49 expected = cases{i}{2};
50 testCase.verifyEqual(isempty(A),expected);
36 end 51 end
37 end 52 end
38 53
39 function testTranspose(testCase) 54 function testTranspose(testCase)
40 testCase.verifyEqual(Cell({1i, 2}).', Cell({1i; 2})); 55 testCase.verifyEqual(Cell({1i, 2}).', Cell({1i; 2}));