Skip to content

Commit 3dd1c30

Browse files
committed
test:SharedTestFixture(PathFixture())
1 parent db13a6a commit 3dd1c30

22 files changed

+49
-129
lines changed

test/TestAbsolute.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
classdef (TestTags = {'R2019b', 'impure'}) ...
1+
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture("..")}, ...
2+
TestTags = {'R2019b', 'impure'}) ...
23
TestAbsolute < matlab.unittest.TestCase
34

45
properties (TestParameter)
@@ -9,9 +10,7 @@
910

1011
methods(TestClassSetup)
1112
function test_dirs(tc)
12-
pkg_path(tc)
13-
14-
tc.applyFixture(matlab.unittest.fixtures.WorkingFolderFixture())
13+
tc.applyFixture(matlab.unittest.fixtures.WorkingFolderFixture())
1514
end
1615
end
1716

test/TestCanonical.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
classdef (TestTags = {'R2019b', 'impure'}) ...
1+
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture("..")}, ...
2+
TestTags = {'R2019b', 'impure'}) ...
23
TestCanonical < matlab.unittest.TestCase
34

45
properties(TestParameter)
@@ -14,9 +15,7 @@
1415

1516
methods(TestClassSetup)
1617
function test_dirs(tc)
17-
pkg_path(tc)
18-
19-
tc.applyFixture(matlab.unittest.fixtures.WorkingFolderFixture())
18+
tc.applyFixture(matlab.unittest.fixtures.WorkingFolderFixture())
2019
end
2120
end
2221

test/TestExpanduser.m

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
classdef (TestTags = {'R2019b', 'impure'}) ...
1+
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture("..")}, ...
2+
TestTags = {'R2019b', 'impure'}) ...
23
TestExpanduser < matlab.unittest.TestCase
34

45
properties(TestParameter)
56
p = init_exp()
67
end
78

8-
methods(TestClassSetup)
9-
function test_dirs(tc)
10-
pkg_path(tc)
11-
end
12-
end
13-
149
methods(Test)
1510

1611
function test_expanduser(tc, p)

test/TestFileImpure.m

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
classdef (TestTags = {'R2019b', 'impure'}) ...
1+
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture("..")}, ...
2+
TestTags = {'R2019b', 'impure'}) ...
23
TestFileImpure < matlab.unittest.TestCase
34

45
properties(TestParameter)
@@ -8,13 +9,6 @@
89
end
910

1011

11-
methods(TestClassSetup)
12-
function test_dirs(tc)
13-
pkg_path(tc)
14-
end
15-
end
16-
17-
1812
methods (Test)
1913

2014
function test_file_size(tc, p_file_size)

test/TestFilePure.m

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
classdef (TestTags = {'R2019b', 'pure'}) ...
1+
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture("..")}, ...
2+
TestTags = {'R2019b', 'pure'}) ...
23
TestFilePure < matlab.unittest.TestCase
34

4-
methods(TestClassSetup)
5-
function test_dirs(tc)
6-
pkg_path(tc)
7-
end
8-
end
9-
105

116
methods (Test)
127

test/TestFilename.m

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
classdef (TestTags = {'R2019b', 'pure'}) ...
1+
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture("..")}, ...
2+
TestTags = {'R2019b', 'pure'}) ...
23
TestFilename < matlab.unittest.TestCase
34

45
properties (TestParameter)
56
p = init_p()
67
backend = init_backend()
78
end
89

9-
methods(TestClassSetup)
10-
function test_dirs(tc)
11-
pkg_path(tc)
12-
end
13-
end
1410

1511
methods (Test)
1612

test/TestIni.m

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
classdef (TestTags = {'R2019b', 'impure'}) ...
1+
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture("..")}, ...
2+
TestTags = {'R2019b', 'impure'}) ...
23
TestIni < matlab.unittest.TestCase
34

4-
methods(TestClassSetup)
5-
function test_dirs(tc)
6-
pkg_path(tc)
7-
end
8-
end
9-
105

116
methods (Test)
127

test/TestIsAbsolute.m

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
classdef (TestTags = {'R2019b', 'pure'}) ...
1+
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture("..")}, ...
2+
TestTags = {'R2019b', 'pure'}) ...
23
TestIsAbsolute < matlab.unittest.TestCase
34

45
properties (TestParameter)
@@ -7,11 +8,6 @@
78
pw = {{"x:/foo", true}, {"/foo", false}}
89
end
910

10-
methods(TestClassSetup)
11-
function test_dirs(tc)
12-
pkg_path(tc)
13-
end
14-
end
1511

1612
methods (Test)
1713

test/TestIsExe.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
classdef (TestTags = {'R2019b', 'pure'}) ...
1+
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture("..")}, ...
2+
TestTags = {'R2019b', 'pure'}) ...
23
TestIsExe < matlab.unittest.TestCase
34

45
properties (TestParameter)
@@ -16,9 +17,7 @@
1617

1718
methods(TestClassSetup)
1819
function test_dirs(tc)
19-
pkg_path(tc)
20-
21-
tc.applyFixture(matlab.unittest.fixtures.WorkingFolderFixture())
20+
tc.applyFixture(matlab.unittest.fixtures.WorkingFolderFixture())
2221
end
2322
end
2423

test/TestIsSubdir.m

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
classdef (TestTags = {'R2019b', 'pure'}) ...
1+
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture("..")}, ...
2+
TestTags = {'R2019b', 'pure'}) ...
23
TestIsSubdir < matlab.unittest.TestCase
34

45
properties (TestParameter)
56
p_is_prefix = init_is_prefix()
67
p_is_subdir = init_is_subdir()
78
end
89

9-
methods(TestClassSetup)
10-
function test_dirs(tc)
11-
pkg_path(tc)
12-
end
13-
end
14-
1510

1611
methods (Test)
1712

0 commit comments

Comments
 (0)