Skip to content

Commit a00baf6

Browse files
committed
remove unused logic
1 parent be2cc9a commit a00baf6

Some content is hidden

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

70 files changed

+19
-369
lines changed

+stdlib/+python/set_modtime.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
function ok = set_modtime(p, utc)
1+
function ok = set_modtime(p, dt)
22

33
ok = false;
44
if ~isfile(p), return, end
55

6-
utc = convertTo(datetime(t, 'TimeZone', "UTC"), "posixtime");
6+
utc = convertTo(datetime(dt, 'TimeZone', "UTC"), "posixtime");
77

88
try
99
s = py.os.stat(p);

+stdlib/+python/version.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
end
77

88
% Matlab < R2022a has a bug in the JIT compiler that breaks try-catch
9-
% for any py.* command.
9+
% for any py.* command.
1010
% We use a separate private function to workaround that.
1111

1212
v = [];

+stdlib/absolute.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,3 @@
2929
c = fullfile(stdlib.absolute(base), p);
3030

3131
end
32-
33-
34-
%!assert(absolute('', ''), pwd)
35-
%!assert(absolute('a/b', ''), fullfile(pwd(), 'a/b'))

+stdlib/auto_chunk_size.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,3 @@
5656
end
5757

5858
end
59-
60-
%!assert(auto_chunk_size([15,250,100]), [2,32,25])

+stdlib/checkRAM.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
limit_bytes = inf; % no limit set
1818

19-
if ~stdlib.isoctave()
2019
% get user set preference for memory limit
2120
s = settings;
2221
ws = s.matlab.desktop.workspace;
@@ -25,7 +24,6 @@
2524
if ws.ArraySizeLimitEnabled.ActiveValue
2625
limit_bytes = double(ws.ArraySizeLimit.ActiveValue) / 100 * stdlib.ram_total();
2726
end
28-
end
2927

3028
limit_bytes = min(limit_bytes, freebytes);
3129

@@ -47,5 +45,3 @@
4745
OK = newSizeBytes < limit_bytes;
4846

4947
end
50-
51-
%!assert(checkRAM([15,2,1], 'double'), true)

+stdlib/cpu_count.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,3 @@
1111
% https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/lang/Runtime.html#getRuntime()
1212
% N=java.lang.Runtime.getRuntime().availableProcessors();
1313
end
14-
15-
%!assert(cpu_count() > 0)

+stdlib/device.m

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,3 @@
1010
i = fun(file);
1111

1212
end
13-
14-
%!assert(device(pwd) >= 0);
15-
%!assert(isempty(device(tempname())));

+stdlib/drop_slash.m

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
%% DROP_SLASH drop repeated and trailing slash
22
%
3-
% on Windows, if leading double slash, do not drop
43

54
function d = drop_slash(p)
65
arguments
@@ -17,13 +16,4 @@
1716
d = regexprep(d, '/$', '');
1817
end
1918

20-
if isstring(p)
21-
d = string(d);
2219
end
23-
24-
end
25-
26-
%!assert(drop_slash(''), '')
27-
%!assert(drop_slash('/'), '/')
28-
%!assert(drop_slash('a//b'), 'a/b')
29-
%!assert(drop_slash('a//b/'), 'a/b')

+stdlib/exists.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,3 @@
1414
y = isfile(p) | isfolder(p);
1515

1616
end
17-
18-
%!assert (!exists(''))
19-
%!assert (!exists(tempname))
20-
%!assert (exists(program_invocation_name))

+stdlib/expanduser.m

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,3 @@
4040
end
4141

4242
end
43-
44-
45-
%!assert(expanduser(''), '')
46-
%!assert(expanduser("~"), homedir())
47-
%!assert(expanduser("~/"), homedir())
48-
%!assert(expanduser("~user"), "~user")
49-
%!assert(expanduser("~user/"), "~user/")
50-
%!assert(expanduser("~/c"), fullfile(homedir(), "c"))

0 commit comments

Comments
 (0)