Skip to content

Commit

Permalink
Add test for MATLAB classes that can't be read
Browse files Browse the repository at this point in the history
  • Loading branch information
jebej committed Feb 25, 2020
1 parent 0d2305e commit 1a2bee6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/read.jl
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,14 @@ let objtestfile = "figure.fig"
@test vars["hgS_070000"]["handle"] == 1.0
@test vars["hgS_070000"]["type"] == "figure"
end

# test reading file containing Matlab table and datetime objects
# since we don't support these objects, just make sure that there are no errors
# reading the file and that the variables are there and replaced with `missing`
let objtestfile = "struct_table_datetime.mat"
vars = matopen(m->read(m,"s"), joinpath(dirname(@__FILE__), "v7.3", objtestfile))
@test "testTable" in keys(vars)
@test ismissing(vars["testTable"])
@test "testDatetime" in keys(vars)
@test ismissing(vars["testDatetime"])
end
Binary file added test/v7.3/struct_table_datetime.mat
Binary file not shown.

0 comments on commit 1a2bee6

Please sign in to comment.