Mercurial > repos > public > sbplib
comparison +multiblock/BoundaryGroupTest.m @ 427:a613960a157b feature/quantumTriangles
merged with feature/beams
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Thu, 26 Jan 2017 15:59:25 +0100 |
parents | 3cedd5a596bb |
children |
comparison
equal
deleted
inserted
replaced
426:29944ea7674b | 427:a613960a157b |
---|---|
1 function tests = BoundaryGroupTest() | |
2 tests = functiontests(localfunctions); | |
3 end | |
4 | |
5 function testCreation(testCase) | |
6 in = {{3,'n'},{2,'hoho'},{1,'s'}}; | |
7 | |
8 blockIDs = [3 2 1]; | |
9 names = {'n', 'hoho', 's'}; | |
10 | |
11 bg = multiblock.BoundaryGroup(in{:}); | |
12 testCase.verifyEqual(bg.blockIDs, blockIDs); | |
13 testCase.verifyEqual(bg.names, names); | |
14 end | |
15 | |
16 function testInputError(testCase) | |
17 in = { | |
18 {'n', 's'}, | |
19 {{3,'n'},{2,2,'hoho'},{1,'s'}}, | |
20 }; | |
21 | |
22 out = { | |
23 'multiblock:BoundaryGroup:BoundaryGroup:InvalidInput', | |
24 'multiblock:BoundaryGroup:BoundaryGroup:InvalidInput', | |
25 }; | |
26 | |
27 for i = 1:length(in) | |
28 testCase.verifyError(@()multiblock.BoundaryGroup(in{i}{:}), out{i}); | |
29 end | |
30 end |