Mercurial > repos > public > sbplib
comparison +grid/funcToComponentsTest.m @ 425:e56dbd9e4196 feature/grids
Merge feature/beams
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 07 Feb 2017 16:09:02 +0100 |
parents | 3ea2ae2a3d15 |
children |
comparison
equal
deleted
inserted
replaced
423:a2cb0d4f4a02 | 425:e56dbd9e4196 |
---|---|
1 function tests = funcToComponentsTest() | |
2 tests = functiontests(localfunctions); | |
3 end | |
4 | |
5 | |
6 function testScalarGf(testCase) | |
7 g = getTestGrid(); | |
8 gf_in = [1; 2; 3]; | |
9 | |
10 testCase.verifyEqual(grid.funcToComponents(g, gf_in), gf_in); | |
11 end | |
12 | |
13 function testVectorGf(testCase) | |
14 g = getTestGrid(); | |
15 gf_in = [1; 2; 3; 4; 5; 6]; | |
16 out = [1 2; 3 4; 5 6]; | |
17 | |
18 testCase.verifyEqual(grid.funcToComponents(g, gf_in), out); | |
19 end | |
20 | |
21 function g = getTestGrid() | |
22 g = grid.equidistant(3,{0,2}); | |
23 end |