Skip to content

Commit 2d2d98b

Browse files
committed
tests for #192
1 parent c695b6f commit 2d2d98b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/runtests.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,8 +778,13 @@ end
778778
@test XLSX.infer_eltype(data[4]) == Union{Missing, String}
779779
@test XLSX.infer_eltype(data[5]) == Float64
780780
@test XLSX.infer_eltype(data[6]) == Any
781-
@test XLSX.infer_eltype([1, "1", 10.2]) == Any
782781
@test XLSX.infer_eltype(Vector{Int}()) == Int
782+
@test XLSX.infer_eltype(Vector{Float64}()) == Float64
783+
@test XLSX.infer_eltype(Vector{Any}()) == Any
784+
@test XLSX.infer_eltype([1, "1", 10.2]) == Any
785+
@test XLSX.infer_eltype([1, 10]) == Int64
786+
@test XLSX.infer_eltype([1.0, 10.0]) == Float64
787+
@test XLSX.infer_eltype([1, 10.2]) == Float64 # Promote mixed int/float columns to float (#192)
783788

784789
dtable_inferred = XLSX.gettable(s, infer_eltypes=true)
785790
data_inferred, col_names = dtable_inferred.data, dtable_inferred.column_labels

0 commit comments

Comments
 (0)