Skip to content

Commit f8d8a06

Browse files
committed
TestTime < R2021a
1 parent 162032b commit f8d8a06

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

test/TestTime.m

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}, ...
2-
TestTags = {'R2021a', 'impure'}) ...
2+
TestTags = {'R2019b', 'impure'}) ...
33
TestTime < matlab.unittest.TestCase
44

55
properties (TestParameter)
6-
B_set_modtime
6+
B_set_modtime = {'java', 'python', 'sys'}
77
end
88

99

10-
methods (TestParameterDefinition, Static)
11-
function B_set_modtime = setupBackends()
12-
B_set_modtime = init_backend("set_modtime");
13-
end
14-
end
15-
1610
methods(TestClassSetup)
1711
function test_path(tc)
1812
tc.applyFixture(matlab.unittest.fixtures.WorkingFolderFixture())
@@ -36,10 +30,13 @@ function test_touch_modtime(tc, B_set_modtime)
3630

3731
ok = stdlib.set_modtime(fn, datetime("now"), B_set_modtime);
3832

39-
tc.assertTrue(ok)
40-
t1 = stdlib.get_modtime(fn);
41-
42-
tc.verifyGreaterThanOrEqual(t1, t0)
33+
if ismember(B_set_modtime, stdlib.Backend().select('set_modtime'))
34+
tc.assertTrue(ok)
35+
t1 = stdlib.get_modtime(fn);
36+
tc.verifyGreaterThanOrEqual(t1, t0)
37+
else
38+
tc.assertEmpty(ok)
39+
end
4340
end
4441

4542
end

0 commit comments

Comments
 (0)