44td
55end
66
7-
87properties (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" }};
2410end
2511
2612
2713methods (TestClassSetup )
2814function set_cwd(tc )
2915import matlab .unittest .fixtures .CurrentFolderFixture
30- tc.td = string( stdlib .posix(tc .createTemporaryFolder() ));
16+ tc.td = stdlib .posix(tc .createTemporaryFolder());
3117tc .applyFixture(CurrentFolderFixture(tc .td ))
3218end
3319end
@@ -40,7 +26,11 @@ function test_absolute1arg(tc, p1)
4026r = tc .td ;
4127
4228if strlength(p1 )
43- r = r + " /" + p1 ;
29+ r = strcat(r , ' /' , p1 );
30+ end
31+
32+ if isstring(p1 )
33+ r = string(r );
4434end
4535
4636tc .verifyEqual(stdlib .absolute(p1 ), r )
@@ -52,11 +42,15 @@ function test_absolute2arg(tc, p2)
5242r = tc .td ;
5343
5444if strlength(p2{2 })
55- r = r + " / " + p2{2 };
45+ r = strcat( r , ' / ' , p2{2 }) ;
5646end
5747
5848if 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 );
6054end
6155
6256tc .verifyEqual(stdlib .absolute(p2{1 }, p2{2 }), r )
0 commit comments