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 Dec 2, 2019
1 parent bed5e8d commit ed85c4a
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 `nothing`
let objtestfile = "struct_table_datetime.mat"
vars = matopen(m->read(m,"s"), joinpath(dirname(@__FILE__), "v7.3", objtestfile))
@test "testTable" in keys(vars)
@test vars["testTable"] == nothing
@test "testDatetime" in keys(vars)
@test vars["testDatetime"] == nothing
end
Binary file added test/v7.3/struct_table_datetime.mat
Binary file not shown.

0 comments on commit ed85c4a

Please sign in to comment.