Skip to content

Commit c3d26d5

Browse files
committed
TestNetCDF: increase type coverage
1 parent 4043432 commit c3d26d5

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

+stdlib/TestNetCDF.m

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
end
66

77
properties (TestParameter)
8-
type = {'single', 'double', 'int8', 'int16', 'int32', 'int64', 'uint8', 'uint16', 'uint32', 'uint64'}
8+
type = {'single', 'double', 'float32', 'float64', ...
9+
'int8', 'int16', 'int32', 'int64', ...
10+
'uint8', 'uint16', 'uint32', 'uint64'}
911
vars = {'A0', 'A1', 'A2', 'A3', 'A4'}
1012
end
1113

@@ -187,7 +189,14 @@ function test_coerce(tc, type)
187189

188190
tc.assumeThat(basic, IsFile)
189191

190-
tc.verifyClass(ncread(basic, vn), type)
192+
if type == "float32"
193+
vtype = "single";
194+
elseif type == "float64"
195+
vtype = "double";
196+
else
197+
vtype = type;
198+
end
199+
tc.verifyClass(ncread(basic, vn), vtype)
191200
end
192201

193202

0 commit comments

Comments
 (0)