Skip to content

Commit 5d6fa4f

Browse files
committed
test: PathFixture needs absolute path for reliability
when it was just ".." intermittantly the wrong path would be added
1 parent c8ad266 commit 5d6fa4f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+51
-51
lines changed

example/BenchmarkCanonical.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture("..")}) ...
1+
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}) ...
22
BenchmarkCanonical < matlab.perftest.TestCase
33

44
properties

example/BenchmarkDevice.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture("..")}) ...
1+
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}) ...
22
BenchmarkDevice < matlab.perftest.TestCase
33

44
properties
@@ -42,4 +42,4 @@ function bench_not_exist(tc, backend)
4242

4343
end
4444

45-
end
45+
end

example/BenchmarkDiskAvailable.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture("..")}) ...
1+
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}) ...
22
BenchmarkDiskAvailable < matlab.perftest.TestCase
33

44
properties
@@ -41,4 +41,4 @@ function bench_not_exist(tc, backend)
4141

4242
end
4343

44-
end
44+
end

example/BenchmarkDiskCapacity.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture("..")}) ...
1+
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}) ...
22
BenchmarkDiskCapacity < matlab.perftest.TestCase
33

44
properties
@@ -41,4 +41,4 @@ function bench_not_exist(tc, backend)
4141

4242
end
4343

44-
end
44+
end

example/BenchmarkGetOwner.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture("..")}) ...
1+
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}) ...
22
BenchmarkGetOwner < matlab.perftest.TestCase
33

44
properties
@@ -41,4 +41,4 @@ function bench_not_exist(tc, backend)
4141

4242
end
4343

44-
end
44+
end

example/BenchmarkInode.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture("..")}) ...
1+
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}) ...
22
BenchmarkInode < matlab.perftest.TestCase
33

44
properties
@@ -42,4 +42,4 @@ function bench_not_exist(tc, backend)
4242

4343
end
4444

45-
end
45+
end

example/BenchmarkSamepath.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture("..")}) ...
1+
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}) ...
22
BenchmarkSamepath < matlab.perftest.TestCase
33

44
properties
@@ -49,4 +49,4 @@ function bench_not_exist(tc, backend)
4949

5050
end
5151

52-
end
52+
end

example/BenchmarkSymlink.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture("..")}) ...
1+
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}) ...
22
BenchmarkSymlink < matlab.perftest.TestCase
33

44
properties
@@ -81,4 +81,4 @@ function bench_read_symlink_not_exist(tc, rs_backend)
8181

8282
end
8383

84-
end
84+
end

test/TestAbsolute.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture("..")}, ...
1+
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}, ...
22
TestTags = {'R2019b', 'impure'}) ...
33
TestAbsolute < matlab.unittest.TestCase
44

test/TestCanonical.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture("..")}, ...
1+
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}, ...
22
TestTags = {'impure'}) ...
33
TestCanonical < matlab.unittest.TestCase
44

0 commit comments

Comments
 (0)