11classdef (SharedTestFixtures = { matlab .unittest .fixtures .PathFixture(fileparts(fileparts(mfilename(' fullpath' ))))}, ...
2- TestTags = {' R2021a ' , ' impure' }) ...
2+ TestTags = {' R2019b ' , ' impure' }) ...
33 TestDisk < matlab .unittest .TestCase
44
55properties
99properties (TestParameter )
1010Ps = {" ." , " " , " /" , getenv(" SystemDrive" ), " not-exist" }
1111Po = {mfilename(" fullpath" ) + " .m" , pwd(), " ." , " " , " not-exist" }
12- B_disk
13- B_is_removable
14- B_is_mount
15- B_hard_link_count
16- B_filesystem_type
17- B_owner
18- B_device
19- B_is_dev_drive
20- end
21-
22- methods (TestParameterDefinition , Static )
23- function [B_disk , B_is_removable , B_is_mount , B_hard_link_count , B_device , B_filesystem_type , B_owner , B_is_dev_drive ] = setupBackends()
24- B_disk = init_backend(" disk_available" );
25- B_is_removable = init_backend(" is_removable" );
26- B_is_mount = init_backend(" is_mount" );
27- B_hard_link_count = init_backend(" hard_link_count" );
28- B_device = init_backend(' device' );
29- B_filesystem_type = init_backend(" filesystem_type" );
30- B_owner = init_backend(" get_owner" );
31- B_is_dev_drive = init_backend(' is_dev_drive' );
32- end
12+ B_ps = {' python' , ' sys' }
13+ B_jps = {' java' , ' python' , ' sys' }
14+ B_jdps = {' java' , ' dotnet' , ' python' , ' sys' }
3315end
3416
3517methods (TestClassSetup )
@@ -40,9 +22,9 @@ function test_dirs(tc)
4022
4123methods (Test )
4224
43- function test_disk_available(tc , Ps , B_disk )
44- [r , b ] = stdlib .disk_available(Ps , B_disk );
45- tc .assertEqual(char(b ), B_disk )
25+ function test_disk_available(tc , Ps , B_jdps )
26+ [r , b ] = stdlib .disk_available(Ps , B_jdps );
27+ tc .assertEqual(char(b ), B_jdps )
4628
4729tc .verifyClass(r , ' uint64' )
4830
@@ -54,9 +36,9 @@ function test_disk_available(tc, Ps, B_disk)
5436end
5537
5638
57- function test_disk_capacity(tc , Ps , B_disk )
58- [r , b ] = stdlib .disk_capacity(Ps , B_disk );
59- tc .assertEqual(char(b ), B_disk )
39+ function test_disk_capacity(tc , Ps , B_jdps )
40+ [r , b ] = stdlib .disk_capacity(Ps , B_jdps );
41+ tc .assertEqual(char(b ), B_jdps )
6042
6143tc .verifyClass(r , ' uint64' )
6244
@@ -68,35 +50,34 @@ function test_disk_capacity(tc, Ps, B_disk)
6850end
6951
7052
71- function test_is_removable(tc , B_is_removable )
72- [y , b ] = stdlib .is_removable(pwd(), B_is_removable );
73- tc .assertEqual(char(b ), B_is_removable )
53+ function test_is_removable(tc , B_ps )
54+ [y , b ] = stdlib .is_removable(pwd(), B_ps );
55+ tc .assertEqual(char(b ), B_ps )
7456tc .verifyClass(y , ' logical' )
7557end
7658
77-
78- function test_is_mount(tc , B_is_mount )
79- y = stdlib .is_mount(pwd(), B_is_mount );
59+ function test_is_mount(tc , B_ps )
60+ y = stdlib .is_mount(pwd(), B_ps );
8061
8162tc .verifyClass(y , ' logical' )
82- tc .verifyTrue(stdlib .is_mount(" /" , B_is_mount ))
83- tc .verifyEmpty(stdlib .is_mount(tempname(), B_is_mount ))
63+ tc .verifyTrue(stdlib .is_mount(" /" , B_ps ))
64+ tc .verifyEmpty(stdlib .is_mount(tempname(), B_ps ))
8465
8566if ispc()
8667 sd = getenv(" SystemDrive" );
8768 tc .assertTrue(sd == stdlib .root_name(sd ), sd )
88- tc .verifyFalse(stdlib .is_mount(sd , B_is_mount ), sd )
89- tc .verifyTrue(stdlib .is_mount(sd + " /" , B_is_mount ), sd )
90- tc .verifyTrue(stdlib .is_mount(sd + " \" , B_is_mount ), sd )
69+ tc .verifyFalse(stdlib .is_mount(sd , B_ps ), sd )
70+ tc .verifyTrue(stdlib .is_mount(sd + " /" , B_ps ), sd )
71+ tc .verifyTrue(stdlib .is_mount(sd + " \" , B_ps ), sd )
9172end
9273end
9374
9475
95- function test_hard_link_count(tc , B_hard_link_count )
76+ function test_hard_link_count(tc , B_jps )
9677P = mfilename(" fullpath" ) + " .m" ;
9778
98- [i , b ] = stdlib .hard_link_count(P , B_hard_link_count );
99- tc .assertEqual(char(b ), B_hard_link_count )
79+ [i , b ] = stdlib .hard_link_count(P , B_jps );
80+ tc .assertEqual(char(b ), B_jps )
10081
10182tc .verifyGreaterThanOrEqual(i , 1 )
10283
@@ -105,9 +86,9 @@ function test_hard_link_count(tc, B_hard_link_count)
10586end
10687
10788
108- function test_filesystem_type(tc , Ps , B_filesystem_type )
109- [t , b ] = stdlib .filesystem_type(Ps , B_filesystem_type );
110- tc .assertEqual(char(b ), B_filesystem_type )
89+ function test_filesystem_type(tc , Ps , B_jdps )
90+ [t , b ] = stdlib .filesystem_type(Ps , B_jdps );
91+ tc .assertEqual(char(b ), B_jdps )
11192tc .verifyClass(t , ' char' )
11293
11394if ~stdlib .exists(Ps )
@@ -120,9 +101,9 @@ function test_filesystem_type(tc, Ps, B_filesystem_type)
120101end
121102
122103
123- function test_is_dev_drive(tc , B_is_dev_drive )
124- [r , b ] = stdlib .is_dev_drive(pwd(), B_is_dev_drive );
125- tc .assertEqual(char(b ), B_is_dev_drive )
104+ function test_is_dev_drive(tc , B_ps )
105+ [r , b ] = stdlib .is_dev_drive(pwd(), B_ps );
106+ tc .assertEqual(char(b ), B_ps )
126107
127108tc .verifyClass(r , ' logical' )
128109end
@@ -141,10 +122,10 @@ function test_remove_file(tc)
141122end
142123
143124
144- function test_device(tc , Po , B_device )
145- [i , b ] = stdlib .device(Po , B_device );
125+ function test_device(tc , Po , B_jps )
126+ [i , b ] = stdlib .device(Po , B_jps );
146127tc .verifyClass(i , ' uint64' )
147- tc .assertEqual(char(b ), B_device )
128+ tc .assertEqual(char(b ), B_jps )
148129
149130if ~stdlib .exists(Po )
150131 tc .verifyEmpty(i )
@@ -155,11 +136,11 @@ function test_device(tc, Po, B_device)
155136end
156137
157138
158- function test_inode(tc , Po , B_device )
139+ function test_inode(tc , Po , B_jps )
159140
160- [i , b ] = stdlib .inode(Po , B_device );
141+ [i , b ] = stdlib .inode(Po , B_jps );
161142tc .verifyClass(i , ' uint64' )
162- tc .assertEqual(char(b ), B_device )
143+ tc .assertEqual(char(b ), B_jps )
163144
164145if ~stdlib .exists(Po )
165146 tc .verifyEmpty(i )
@@ -170,9 +151,9 @@ function test_inode(tc, Po, B_device)
170151end
171152
172153
173- function test_owner(tc , Po , B_owner )
174- [o , b ] = stdlib .get_owner(Po , B_owner );
175- tc .assertEqual(char(b ), B_owner )
154+ function test_owner(tc , Po , B_jdps )
155+ [o , b ] = stdlib .get_owner(Po , B_jdps );
156+ tc .assertEqual(char(b ), B_jdps )
176157tc .verifyClass(o , ' char' )
177158
178159if ~stdlib .exists(Po )
0 commit comments