Skip to content

Commit

Permalink
tests for #192
Browse files Browse the repository at this point in the history
  • Loading branch information
felipenoris committed Sep 22, 2024
1 parent c695b6f commit 2d2d98b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -778,8 +778,13 @@ end
@test XLSX.infer_eltype(data[4]) == Union{Missing, String}
@test XLSX.infer_eltype(data[5]) == Float64
@test XLSX.infer_eltype(data[6]) == Any
@test XLSX.infer_eltype([1, "1", 10.2]) == Any
@test XLSX.infer_eltype(Vector{Int}()) == Int
@test XLSX.infer_eltype(Vector{Float64}()) == Float64
@test XLSX.infer_eltype(Vector{Any}()) == Any
@test XLSX.infer_eltype([1, "1", 10.2]) == Any
@test XLSX.infer_eltype([1, 10]) == Int64
@test XLSX.infer_eltype([1.0, 10.0]) == Float64
@test XLSX.infer_eltype([1, 10.2]) == Float64 # Promote mixed int/float columns to float (#192)

dtable_inferred = XLSX.gettable(s, infer_eltypes=true)
data_inferred, col_names = dtable_inferred.data, dtable_inferred.column_labels
Expand Down

0 comments on commit 2d2d98b

Please sign in to comment.