comparison MapTest.m @ 1018:eca4d9df9365 feature/advectionRV

Merge with default for latest changes
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Tue, 11 Dec 2018 17:31:28 +0100
parents a6c5e73ff44e
children
comparison
equal deleted inserted replaced
1017:2d7c1333bd6c 1018:eca4d9df9365
8 struct(), [1; 3; 4]; 8 struct(), [1; 3; 4];
9 [1,2; 4 3], struct(); 9 [1,2; 4 3], struct();
10 'Hej', struct('lol', 6); 10 'Hej', struct('lol', 6);
11 0, 'Nej'; 11 0, 'Nej';
12 }; 12 };
13 end
14
15 function testMultiKey(testCase)
16 map = Map
17
18 function setMultiKey()
19 map(1,2) = 1;
20 end
21
22 function getMultiKey()
23 v = map(1,2);
24 end
25
26 testCase.verifyError(@setMultiKey,'sbplib:Map:multipleKeys')
27 testCase.verifyError(@getMultiKey,'sbplib:Map:multipleKeys')
13 end 28 end
14 29
15 function testSetAndGet(testCase) 30 function testSetAndGet(testCase)
16 keyValuePairs = getKeyValuePairs(); 31 keyValuePairs = getKeyValuePairs();
17 32