4
4
td
5
5
end
6
6
7
-
8
7
properties (TestParameter )
9
- p1
10
- p2
11
- end
12
-
13
-
14
- methods (TestParameterDefinition , Static )
15
-
16
- function p1 = init1arg()
17
- p1 = {" " , " hi" , " ./hi" , " ../hi" };
18
- end
19
-
20
- function p2 = init2arg()
21
- p2 = {{" " , " " }, {" " , " hi" }, {" hi" , " " }, {" there" , " hi" }};
22
- end
23
-
8
+ p1 = {' ' , " " , " hi" , " ./hi" , " ../hi" };
9
+ p2 = {{' ' , ' ' }, {' ' , " " }, {" " , ' ' }, {" " , " " }, {" " , " hi" }, {" hi" , " " }, {' there' , " hi" }};
24
10
end
25
11
26
12
27
13
methods (TestClassSetup )
28
14
function set_cwd(tc )
29
15
import matlab .unittest .fixtures .CurrentFolderFixture
30
- tc.td = string( stdlib .posix(tc .createTemporaryFolder() ));
16
+ tc.td = stdlib .posix(tc .createTemporaryFolder());
31
17
tc .applyFixture(CurrentFolderFixture(tc .td ))
32
18
end
33
19
end
@@ -40,7 +26,11 @@ function test_absolute1arg(tc, p1)
40
26
r = tc .td ;
41
27
42
28
if strlength(p1 )
43
- r = r + " /" + p1 ;
29
+ r = strcat(r , ' /' , p1 );
30
+ end
31
+
32
+ if isstring(p1 )
33
+ r = string(r );
44
34
end
45
35
46
36
tc .verifyEqual(stdlib .absolute(p1 ), r )
@@ -52,11 +42,15 @@ function test_absolute2arg(tc, p2)
52
42
r = tc .td ;
53
43
54
44
if strlength(p2{2 })
55
- r = r + " / " + p2{2 };
45
+ r = strcat( r , ' / ' , p2{2 }) ;
56
46
end
57
47
58
48
if strlength(p2{1 })
59
- r = r + " /" + p2{1 };
49
+ r = strcat(r , ' /' , p2{1 });
50
+ end
51
+
52
+ if isstring(p2{1 })
53
+ r = string(r );
60
54
end
61
55
62
56
tc .verifyEqual(stdlib .absolute(p2{1 }, p2{2 }), r )
0 commit comments