Skip to content

Commit 4686bb1

Browse files
committed
lint
1 parent 543b1a7 commit 4686bb1

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

+stdlib/+dotnet/ram_total.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
function bytes = ram_total()
44
% .NET is 2-3x faster than Java for this
55
% https://learn.microsoft.com/en-us/dotnet/api/system.gcmemoryinfo.totalavailablememorybytes
6-
try
7-
bytes = System.GC.GetGCMemoryInfo().TotalAvailableMemoryBytes;
8-
catch
9-
bytes = [];
10-
end
6+
try
7+
bytes = System.GC.GetGCMemoryInfo().TotalAvailableMemoryBytes;
8+
catch
9+
bytes = [];
10+
end
1111

12-
bytes = uint64(bytes);
12+
bytes = uint64(bytes);
1313
end

test/TestSys.m

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,11 @@ function test_cpu_load(tc, B_cpu_load)
5555

5656

5757
function test_process_priority(tc, B_get_process_priority)
58+
import matlab.unittest.constraints.IsSubsetOf
5859
[r, b] = stdlib.get_process_priority(B_get_process_priority);
5960
tc.assertEqual(char(b), B_get_process_priority)
60-
if ispc()
61-
rExp = 'char';
62-
else
63-
rExp = 'double';
64-
end
65-
tc.verifyClass(r, rExp)
61+
62+
tc.verifyThat({class(r)}, IsSubsetOf({'double', 'char'}))
6663
tc.verifyNotEmpty(r)
6764
end
6865

0 commit comments

Comments
 (0)