Skip to content

Commit

Permalink
Add test case for force_layer
Browse files Browse the repository at this point in the history
  • Loading branch information
davide-f committed Feb 7, 2022
1 parent 4ae4cf1 commit f3e03e9
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions test/demos.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,13 @@ function test_example(layout, graph_name, tol=0.05; kwargs...)
@testset "$graph_name direct" begin
graph = getfield(Examples, graph_name)
filename = "$graph_name" * join("_" .* string.(keys(kwargs))) * ".png"
println(filename)
ref_filename = joinpath(@__DIR__, "references", string(typeof(layout)), "direct", filename)
mkpath(dirname(ref_filename))
@plottest quick_plot_solve_direct(layout, graph; kwargs...) ref_filename true tol
end
@testset "$graph_name paths" begin
graph = getfield(Examples, graph_name)
filename = "$graph_name" * join("_" .* string.(keys(kwargs))) * ".png"
println(filename)
ref_filename = joinpath(@__DIR__, "references", string(typeof(layout)), "paths", filename)
mkpath(dirname(ref_filename))
@plottest quick_plot_solve_paths(layout, graph; kwargs...) ref_filename true tol
Expand All @@ -71,7 +69,7 @@ end
# test_example(layout, :two_lines, 0.02)
# test_example(layout, :xcross)
# test_example(layout, :tree, 0.07)
test_example(layout, :two_lines, 0.07; force_layer=[6=>3])
test_example(layout, :two_lines, 0.07; force_layer=[6=>3, 8=>4])
#test_example(layout, :large_depgraph) # too big
#test_example(layout, :extra_large_depgraph) # too big
end
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ using Plots
using Graphs
using LayeredLayouts
using Test
# using Gtk # enable for replacing test images
using VisualRegressionTests

include("examples.jl")
Expand Down

0 comments on commit f3e03e9

Please sign in to comment.