Avoid print warning for empty datasets; Added corresponding test

This commit is contained in:
Giorgio Calderone 2020-03-19 20:03:45 +01:00
parent 4830e0c028
commit da52fd03d2
2 changed files with 7 additions and 1 deletions

View File

@ -618,7 +618,7 @@ function driver(args...; flag3d=false)
AllArraysAreNotEmpty = true AllArraysAreNotEmpty = true
for i in 1:length(data) for i in 1:length(data)
if (typeof(data[i]) <: AbstractArray) && (length(data[i]) == 0) if (typeof(data[i]) <: AbstractArray) && (length(data[i]) == 0)
@warn "Input array is empty" #@warn "Input array is empty"
AllArraysAreNotEmpty = false AllArraysAreNotEmpty = false
break break
end end

View File

@ -79,6 +79,12 @@ pal = palette(:deepsea)
ls = linestyles(:deepsea) ls = linestyles(:deepsea)
@test ls == "set style line 1 lt 1 lc rgb '#2B004D\nset style line 2 lt 1 lc rgb '#4E0F99\nset style line 3 lt 1 lc rgb '#3C54D4\nset style line 4 lt 1 lc rgb '#48A9F8\nset style line 5 lt 1 lc rgb '#C5ECFF" @test ls == "set style line 1 lt 1 lc rgb '#2B004D\nset style line 2 lt 1 lc rgb '#4E0F99\nset style line 3 lt 1 lc rgb '#3C54D4\nset style line 4 lt 1 lc rgb '#48A9F8\nset style line 5 lt 1 lc rgb '#C5ECFF"
#-----------------------------------------------------------------
# Test wth empty dataset
@gp Float64[]
@gsp Float64[]
#----------------------------------------------------------------- #-----------------------------------------------------------------
x = collect(1.:100); x = collect(1.:100);