Skip to content

Commit cb4e254

Browse files
committed
improve test coverage
1 parent e26dd01 commit cb4e254

20 files changed

+67
-53
lines changed

+stdlib/+sys/cpu_load.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
if ispc()
66
cmd = 'pwsh -c "Get-CimInstance -ClassName Win32_Processor | Measure-Object -Property LoadPercentage -Average | Select-Object -ExpandProperty Average"';
77
elseif ismac()
8-
cmd = "sysctl -n vm.loadavg | awk '{print $2}'";
8+
cmd = 'sysctl -n vm.loadavg | awk ''{print $2}''';
99
else
10-
cmd = "cat /proc/loadavg | awk '{print $1}'";
10+
cmd = 'cat /proc/loadavg | awk ''{print $1}''';
1111
end
1212

1313
[status, m] = system(cmd);

+stdlib/+sys/ram_free.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
elseif ismac()
88
cmd = 'sysctl -n vm.page_free_count';
99
else
10-
cmd = "free -b | awk '/Mem:/ {print $4}'";
10+
cmd = 'free -b | awk ''/Mem:/ {print $4}''';
1111
end
1212

1313
[s, m] = system(cmd);

+stdlib/+sys/ram_total.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
elseif ismac()
88
cmd = 'sysctl -n hw.memsize';
99
else
10-
cmd = "free -b | awk '/Mem:/ {print $2}'";
10+
cmd = 'free -b | awk ''/Mem:/ {print $2}''';
1111
end
1212

1313
[s, m] = system(cmd);

test/TestAbsolute.m

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

55
properties (TestParameter)

test/TestCanonical.m

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

55
properties (TestParameter)

test/TestFileImpure.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function test_null_file(tc)
4040

4141

4242
function test_makedir(tc)
43-
d = "test_makedir.dir";
43+
d = 'test_makedir.dir';
4444
stdlib.makedir(d)
4545

4646
if stdlib.matlabOlderThan('R2018a')

test/TestHash.m

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}, ...
2-
TestTags = {'R2017b', 'impure'}) ...
2+
TestTags = {'R2017a'}) ...
33
TestHash < matlab.unittest.TestCase
44

55
properties
@@ -25,13 +25,11 @@ function create_file(tc)
2525
tc.assumeGreaterThan(fid, 0);
2626
fprintf(fid, "hello");
2727
fclose(fid);
28-
tc.assumeTrue(isfile(tc.file))
2928
tc.assertEqual(stdlib.file_size(tc.file), 5)
3029

3130
fid = fopen(tc.empty, "w");
3231
tc.assumeGreaterThan(fid, 0);
3332
fclose(fid);
34-
tc.assumeTrue(isfile(tc.empty))
3533
tc.assertEqual(stdlib.file_size(tc.empty), 0)
3634
end
3735
end

test/TestIni.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}, ...
2-
TestTags = {'R2017b', 'impure'}) ...
2+
TestTags = {'R2017a', 'impure'}) ...
33
TestIni < matlab.unittest.TestCase
44

55

test/TestIsAbsolute.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}, ...
2-
TestTags = {'R2017b', 'pure'}) ...
2+
TestTags = {'R2017a', 'pure'}) ...
33
TestIsAbsolute < matlab.unittest.TestCase
44

55
properties (TestParameter)

test/TestIsSubdir.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}, ...
2-
TestTags = {'R2017b', 'pure'}) ...
2+
TestTags = {'R2017a', 'pure'}) ...
33
TestIsSubdir < matlab.unittest.TestCase
44

55
properties (TestParameter)

0 commit comments

Comments
 (0)