Skip to content

Commit 265d2c5

Browse files
committed
lint
1 parent 99c3499 commit 265d2c5

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

+stdlib/create_symlink.m

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
end
99

1010
if ispc || isMATLABReleaseOlderThan("R2024b")
11-
% import java.io.File
12-
% import java.nio.file.Files
13-
% ok = Files.createSymbolicLink(File(link).toPath(), File(target).toPath());
11+
% ok = java.nio.file.Files.createSymbolicLink(java.io.File(link).toPath(), java.io.File(target).toPath());
1412
% the above should work, but Matlab Java doesn't recognize the optional argument omitted.
1513

1614
if stdlib.exists(link)

test/TestFileImpure.m

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,16 @@ function test_expanduser(tc, in_expand, ref_expand)
7373

7474

7575
function test_null_file(tc)
76+
import matlab.unittest.constraints.IsFile
7677
tc.assumeFalse(ispc)
77-
tc.verifyTrue(isfile(stdlib.null_file), "Null file not exist")
78+
tc.verifyThat(stdlib.null_file, IsFile)
7879
end
7980

8081

8182
function test_is_regular_file(tc)
82-
83+
import matlab.unittest.constraints.IsFile
8384
if ~ispc
84-
tc.assumeTrue(isfile(stdlib.null_file), "null file not exist")
85+
tc.assumeThat(stdlib.null_file, IsFile)
8586
end
8687
tc.verifyFalse(stdlib.is_regular_file(stdlib.null_file), "null file is not a regular file")
8788

@@ -216,9 +217,10 @@ function test_resolve(tc)
216217

217218

218219
function test_makedir(tc)
220+
import matlab.unittest.constraints.IsFolder
219221
d = tempname;
220222
stdlib.makedir(d)
221-
tc.assertTrue(isfolder(d))
223+
tc.assertThat(d, IsFolder)
222224
end
223225

224226
%%

0 commit comments

Comments
 (0)