From 2d2d98ba78147b773ca61310371899ad8646d8f1 Mon Sep 17 00:00:00 2001 From: Felipe Noronha Date: Sat, 21 Sep 2024 23:52:41 -0300 Subject: [PATCH] tests for #192 --- test/runtests.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index 85eeb00..1eda966 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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