Skip to content

Commit 455442c

Browse files
committed
Some small coverage fixes
1 parent 19a7107 commit 455442c

4 files changed

Lines changed: 12 additions & 7 deletions

File tree

‎tests/edgeCaseCoverageTest.m‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,16 @@ function testCompactColumnDisplay(testCase)
266266
testCase.verifyNotEmpty(output);
267267
end
268268

269+
function testDisplayKeyWithSpace(testCase)
270+
yaml = "hello world: 42";
271+
file = [tempname, '.yaml'];
272+
testCase.addTeardown(@() delete(file));
273+
writelines(yaml, file);
274+
obj = readyaml(file);
275+
output = evalc('disp(obj)');
276+
testCase.verifySubstring(output, "hello world");
277+
end
278+
269279
end
270280

271281
methods (Access = private)

‎toolbox/+matlab/+io/+config/+internal/+write/formatYAMLScalar.m‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
arguments
66
value
7-
precision (1,1) double = 6
7+
precision (1,1) double
88
end
99

1010
if islogical(value)

‎toolbox/+matlab/+io/+config/+internal/+write/formatYAMLSequence.m‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
arguments
66
arr
7-
precision (1,1) double = 6
7+
precision (1,1) double
88
end
99

1010
n = numel(arr);

‎toolbox/+matlab/+io/+config/+internal/@ConfigurationStorage/tryConcatenate.m‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
% Returns typed array if all values have same type, otherwise errors.
44
% Missing values coerce to NaN (double/single) or <missing> (string).
55

6-
if isempty(values)
7-
result = [];
8-
return;
9-
end
10-
116
inputShape = size(values);
127

138
% Identify missing values

0 commit comments

Comments
 (0)