33 TestTime < matlab .unittest .TestCase
44
55properties (TestParameter )
6- B_set_modtime = {' java' , ' python' , ' sys' }
6+ B_jps = {' java' , ' python' , ' sys' }
7+ B_dps = {' dotnet' , ' python' , ' sys' }
78end
89
910
@@ -21,16 +22,16 @@ function test_get_modtime(tc)
2122end
2223
2324
24- function test_touch_modtime(tc , B_set_modtime )
25+ function test_touch_modtime(tc , B_jps )
2526
2627fn = ' touch.txt' ;
2728
2829tc .assertTrue(stdlib .touch(fn ))
2930t0 = stdlib .get_modtime(fn );
3031
31- ok = stdlib .set_modtime(fn , datetime(' tomorrow' ), B_set_modtime );
32+ ok = stdlib .set_modtime(fn , datetime(' tomorrow' ), B_jps );
3233
33- if ismember(B_set_modtime , stdlib .Backend().select(' set_modtime' ))
34+ if ismember(B_jps , stdlib .Backend().select(' set_modtime' ))
3435 tc .assertTrue(ok )
3536 t1 = stdlib .get_modtime(fn );
3637 tc .verifyGreaterThanOrEqual(t1 , t0 )
@@ -39,6 +40,18 @@ function test_touch_modtime(tc, B_set_modtime)
3940end
4041end
4142
43+
44+ function test_uptime(tc , B_dps )
45+
46+ if ismember(B_dps , stdlib .Backend().select(' uptime' ))
47+ t1 = stdlib .uptime(B_dps );
48+ tc .verifyGreaterThanOrEqual(t1 , 0 );
49+ tc .verifyClass(t1 , ' double' )
50+ else
51+ t1 = stdlib .uptime(B_dps );
52+ tc .verifyEmpty(t1 )
53+ end
4254end
4355
4456end
57+ end
0 commit comments