From da52fd03d2499b7d11a6bee3bc6361defa559356 Mon Sep 17 00:00:00 2001 From: Giorgio Calderone Date: Thu, 19 Mar 2020 20:03:45 +0100 Subject: [PATCH] Avoid print warning for empty datasets; Added corresponding test --- src/Gnuplot.jl | 2 +- test/runtests.jl | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Gnuplot.jl b/src/Gnuplot.jl index 99ee308..6c1fed1 100644 --- a/src/Gnuplot.jl +++ b/src/Gnuplot.jl @@ -618,7 +618,7 @@ function driver(args...; flag3d=false) AllArraysAreNotEmpty = true for i in 1:length(data) if (typeof(data[i]) <: AbstractArray) && (length(data[i]) == 0) - @warn "Input array is empty" + #@warn "Input array is empty" AllArraysAreNotEmpty = false break end diff --git a/test/runtests.jl b/test/runtests.jl index b218bb6..277a642 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -79,6 +79,12 @@ pal = palette(: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 wth empty dataset +@gp Float64[] +@gsp Float64[] + + #----------------------------------------------------------------- x = collect(1.:100);