|
1 | 1 | classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}, ... |
2 | | - TestTags = {'R2021a', 'pure'}) ... |
| 2 | + TestTags = {'R2019b', 'pure'}) ... |
3 | 3 | TestRelative < matlab.unittest.TestCase |
4 | 4 |
|
5 | 5 |
|
6 | 6 | properties (TestParameter) |
7 | | -pr |
| 7 | +pr = init_rel(); |
8 | 8 | end |
9 | 9 |
|
10 | 10 |
|
11 | | -methods (TestParameterDefinition, Static) |
| 11 | +methods (Test) |
| 12 | + |
| 13 | +function test_relative_to(tc, pr) |
| 14 | +r = stdlib.relative_to(pr{1}, pr{2}); |
| 15 | + |
| 16 | +tc.verifyEqual(r, pr{3}, "relative_to(" + pr{1} + "," + pr{2}+")") |
| 17 | +end |
| 18 | + |
| 19 | +function test_proximate_to(tc, pr) |
| 20 | +r = stdlib.proximate_to(pr{1}, pr{2}); |
| 21 | + |
| 22 | +tc.verifyEqual(r, pr{3}, "proximate_to(" + pr{1} + ", " + pr{2}+")") |
| 23 | +end |
| 24 | + |
| 25 | +end |
| 26 | +end |
| 27 | + |
12 | 28 |
|
13 | 29 | function pr = init_rel() |
14 | 30 |
|
|
56 | 72 | }]; |
57 | 73 | end |
58 | 74 | end |
59 | | -end |
60 | | - |
61 | | - |
62 | | -methods (Test) |
63 | | - |
64 | | -function test_relative_to(tc, pr) |
65 | | -r = stdlib.relative_to(pr{1}, pr{2}); |
66 | | - |
67 | | -tc.verifyEqual(r, pr{3}, "relative_to(" + pr{1} + "," + pr{2}+")") |
68 | | -end |
69 | | - |
70 | | -function test_proximate_to(tc, pr) |
71 | | -r = stdlib.proximate_to(pr{1}, pr{2}); |
72 | | - |
73 | | -tc.verifyEqual(r, pr{3}, "proximate_to(" + pr{1} + ", " + pr{2}+")") |
74 | | -end |
75 | | - |
76 | | -end |
77 | | -end |
0 commit comments