File tree Expand file tree Collapse file tree 2 files changed +9
-12
lines changed Expand file tree Collapse file tree 2 files changed +9
-12
lines changed Original file line number Diff line number Diff line change 33function 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 );
1313end
Original file line number Diff line number Diff line change @@ -55,14 +55,11 @@ function test_cpu_load(tc, B_cpu_load)
5555
5656
5757function 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 );
5960tc .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' }))
6663tc .verifyNotEmpty(r )
6764end
6865
You can’t perform that action at this time.
0 commit comments