Mercurial > repos > public > sbplib
comparison MapTest.m @ 979:7a5e770974ed feature/timesteppers
Merge with default
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Mon, 07 Jan 2019 16:26:00 +0100 |
| parents | a6c5e73ff44e |
| children |
comparison
equal
deleted
inserted
replaced
| 933:34b3d092a4d0 | 979:7a5e770974ed |
|---|---|
| 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 |
