Skip to content

Commit bc6dfe3

Browse files
committed
Add test for MATLAB classes that can't be read
1 parent 5b6117c commit bc6dfe3

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

test/read.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,14 @@ let objtestfile = "figure.fig"
212212
@test vars["hgS_070000"]["handle"] == 1.0
213213
@test vars["hgS_070000"]["type"] == "figure"
214214
end
215+
216+
# test reading file containing Matlab table and datetime objects
217+
# since we don't support these objects, just make sure that there are no errors
218+
# reading the file and that the variables are there and replaced with `missing`
219+
let objtestfile = "struct_table_datetime.mat"
220+
vars = matopen(m->read(m,"s"), joinpath(dirname(@__FILE__), "v7.3", objtestfile))
221+
@test "testTable" in keys(vars)
222+
@test ismissing(vars["testTable"])
223+
@test "testDatetime" in keys(vars)
224+
@test ismissing(vars["testDatetime"])
225+
end

test/v7.3/struct_table_datetime.mat

33.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)