Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg committed Oct 12, 2024
1 parent e3becbf commit 745bce3
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions test/tst_issues.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,31 +89,21 @@
y = @. 2x * u"s"
ylim = (0u"s", 8u"s")

p = lineplot(x, y; ylim)
show(devnull, p)

p = scatterplot(x, y; ylim)
show(devnull, p)
@test lineplot(x, y; ylim) isa Plot
@test scatterplot(x, y; ylim) isa Plot
end

@testset "Unitful dispatch (#383)" begin
p = lineplot(rand(1), rand(1) * u"m")
show(devnull, p)
p = lineplot(rand(1) * u"m", rand(1))
show(devnull, p)

p = scatterplot(rand(1), rand(1) * u"m")
show(devnull, p)
p = scatterplot(rand(1) * u"m", rand(1))
show(devnull, p)
@test lineplot(rand(1), rand(1) * u"m") isa Plot
@test lineplot(rand(1) * u"m", rand(1)) isa Plot

@test scatterplot(rand(1), rand(1) * u"m") isa Plot
@test scatterplot(rand(1) * u"m", rand(1)) isa Plot
end

@testset "Heatmap ±Inf (#378)" begin
p = heatmap([1 2; 3 -Inf])
show(devnull, p)
p = heatmap([-Inf;;])
show(devnull, p)
p = heatmap([1 2; 3 Inf])
show(devnull, p)
@test heatmap([1 2; 3 -Inf]) isa Plot
@test heatmap([-Inf]') isa Plot
@test heatmap([1 2; 3 Inf]) isa Plot
end
end

0 comments on commit 745bce3

Please sign in to comment.