Skip to content

Commit

Permalink
TestNetCDF: increase type coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed May 19, 2022
1 parent 4043432 commit c3d26d5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions +stdlib/TestNetCDF.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
end

properties (TestParameter)
type = {'single', 'double', 'int8', 'int16', 'int32', 'int64', 'uint8', 'uint16', 'uint32', 'uint64'}
type = {'single', 'double', 'float32', 'float64', ...
'int8', 'int16', 'int32', 'int64', ...
'uint8', 'uint16', 'uint32', 'uint64'}
vars = {'A0', 'A1', 'A2', 'A3', 'A4'}
end

Expand Down Expand Up @@ -187,7 +189,14 @@ function test_coerce(tc, type)

tc.assumeThat(basic, IsFile)

tc.verifyClass(ncread(basic, vn), type)
if type == "float32"
vtype = "single";
elseif type == "float64"
vtype = "double";
else
vtype = type;
end
tc.verifyClass(ncread(basic, vn), vtype)
end


Expand Down

0 comments on commit c3d26d5

Please sign in to comment.