Skip to content

Commit 1f8e138

Browse files
committed
test: remove unused code
1 parent 4c68b01 commit 1f8e138

File tree

15 files changed

+14
-105
lines changed

15 files changed

+14
-105
lines changed

test/TestHDF4.m

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55
end
66

77
methods (TestClassSetup)
8-
9-
function setup_path(tc)
10-
top = fullfile(fileparts(mfilename("fullpath")), "..");
11-
tc.applyFixture(matlab.unittest.fixtures.PathFixture(top))
12-
end
13-
148
function setup_file(tc)
159
import matlab.unittest.constraints.IsFile
1610
tc.TestData.basic = fullfile(matlabroot, "toolbox/matlab/demos/example.hdf");

test/TestHDF5.m

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
end
1313

1414
methods(TestClassSetup)
15-
function setup_path(tc)
16-
top = fullfile(fileparts(mfilename("fullpath")), "..");
17-
tc.applyFixture(matlab.unittest.fixtures.PathFixture(top))
18-
end
19-
2015
function setup_file(tc)
2116
import matlab.unittest.fixtures.TemporaryFolderFixture
2217
import matlab.unittest.constraints.IsFile

test/TestHash.m

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,9 @@
66
end
77

88
methods(TestClassSetup)
9-
10-
function setup_path(tc)
11-
top = fullfile(fileparts(mfilename("fullpath")), "..");
12-
tc.applyFixture(matlab.unittest.fixtures.PathFixture(top))
13-
14-
tc.assumeTrue(stdlib.has_java)
9+
function java_required(tc)
10+
tc.assumeTrue(stdlib.has_java())
1511
end
16-
1712
end
1813

1914
methods (Test, ParameterCombination = 'sequential')

test/TestIni.m

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
classdef TestIni < matlab.unittest.TestCase
22

3-
methods (TestClassSetup)
4-
function setup_path(tc)
5-
top = fullfile(fileparts(mfilename("fullpath")), "..");
6-
tc.applyFixture(matlab.unittest.fixtures.PathFixture(top))
7-
end
8-
end
93

104
methods (Test)
115

test/TestJava.m

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
classdef TestJava < matlab.unittest.TestCase
22

33
methods(TestClassSetup)
4-
5-
function setup_path(tc)
6-
top = fullfile(fileparts(mfilename("fullpath")), "..");
7-
tc.applyFixture(matlab.unittest.fixtures.PathFixture(top))
8-
9-
tc.assumeTrue(stdlib.has_java)
4+
function java_required(tc)
5+
tc.assumeTrue(stdlib.has_java())
106
end
11-
127
end
138

9+
1410
methods(Test)
1511

1612
function test_filesystem_type(tc)

test/TestNetCDF.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
end
66

77
methods (TestClassSetup)
8-
function setup_path(tc)
9-
top = fullfile(fileparts(mfilename("fullpath")), "..");
10-
tc.applyFixture(matlab.unittest.fixtures.PathFixture(top))
11-
end
128

139
function setup_file(tc)
1410
import matlab.unittest.constraints.IsFile

test/TestParent.m

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,6 @@
44
p_parent
55
end
66

7-
methods (TestClassSetup)
8-
% TestClassSetup runs this once per class instead of TestMethodSetup that
9-
% runs once per test, which is much slower and unnecessary
10-
function setup_path(tc)
11-
top = fullfile(fileparts(mfilename("fullpath")), "..");
12-
tc.applyFixture(matlab.unittest.fixtures.PathFixture(top))
13-
end
14-
end
15-
16-
177
methods(TestParameterDefinition, Static)
188

199
function p_parent = init_parent()

test/TestRelative.m

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,6 @@
9494
end
9595

9696

97-
methods (TestClassSetup)
98-
99-
function setup_path(tc)
100-
top = fullfile(fileparts(mfilename("fullpath")), "..");
101-
tc.applyFixture(matlab.unittest.fixtures.PathFixture(top))
102-
end
103-
104-
end
105-
106-
10797
methods (Test)
10898

10999

test/TestResolve.m

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22

33
methods(TestClassSetup)
44

5-
function setup_path(tc)
6-
top = fullfile(fileparts(mfilename("fullpath")), "..");
7-
tc.applyFixture(matlab.unittest.fixtures.PathFixture(top))
8-
end
9-
10-
115
function setup_workdir(tc)
126
import matlab.unittest.constraints.IsFile
137
import matlab.unittest.fixtures.TemporaryFolderFixture

test/TestSubprocess.m

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
classdef TestSubprocess < matlab.unittest.TestCase
22

3-
methods (TestClassSetup)
4-
function setup_path(tc)
5-
top = fullfile(fileparts(mfilename("fullpath")), "..");
6-
tc.applyFixture(matlab.unittest.fixtures.PathFixture(top))
7-
8-
tc.assumeTrue(stdlib.has_java)
3+
methods(TestClassSetup)
4+
function java_required(tc)
5+
tc.assumeTrue(stdlib.has_java())
96
end
107
end
118

0 commit comments

Comments
 (0)