Move input text files
This commit is contained in:
@ -2,7 +2,7 @@ using Random
|
||||
|
||||
function test_known_graph(name::String, n, fusion_test=true)
|
||||
@testset "Test $name Graph ($n)" begin
|
||||
graph = parse_abc(joinpath(@__DIR__, "..", "examples", "$name.txt"))
|
||||
graph = parse_abc(joinpath(@__DIR__, "..", "input", "$name.txt"))
|
||||
props = graph_properties(graph)
|
||||
|
||||
if (fusion_test)
|
||||
|
@ -61,7 +61,7 @@ import MetagraphOptimization.make_edge
|
||||
|
||||
@test length(opt) == (nodeFusions = 6, nodeReductions = 1, nodeSplits = 1)
|
||||
|
||||
println("Initial State:\n", opt)
|
||||
#println("Initial State:\n", opt)
|
||||
|
||||
nr = first(opt.nodeReductions)
|
||||
@test Set(nr.input) == Set([B1C_1, B1C_2])
|
||||
@ -69,7 +69,7 @@ import MetagraphOptimization.make_edge
|
||||
opt = get_operations(graph)
|
||||
|
||||
@test length(opt) == (nodeFusions = 4, nodeReductions = 1, nodeSplits = 1)
|
||||
println("After 1 Node Reduction:\n", opt)
|
||||
#println("After 1 Node Reduction:\n", opt)
|
||||
|
||||
nr = first(opt.nodeReductions)
|
||||
@test Set(nr.input) == Set([B1D_1, B1D_2])
|
||||
@ -77,18 +77,18 @@ import MetagraphOptimization.make_edge
|
||||
opt = get_operations(graph)
|
||||
|
||||
@test length(opt) == (nodeFusions = 4, nodeReductions = 0, nodeSplits = 1)
|
||||
println("After 2 Node Reductions:\n", opt)
|
||||
#println("After 2 Node Reductions:\n", opt)
|
||||
|
||||
pop_operation!(graph)
|
||||
|
||||
opt = get_operations(graph)
|
||||
@test length(opt) == (nodeFusions = 4, nodeReductions = 1, nodeSplits = 1)
|
||||
println("After reverting the second Node Reduction:\n", opt)
|
||||
#println("After reverting the second Node Reduction:\n", opt)
|
||||
|
||||
reset_graph!(graph)
|
||||
|
||||
opt = get_operations(graph)
|
||||
@test length(opt) == (nodeFusions = 6, nodeReductions = 1, nodeSplits = 1)
|
||||
println("After reverting to the initial state:\n", opt)
|
||||
#println("After reverting to the initial state:\n", opt)
|
||||
end
|
||||
println("Node Reduction Unit Tests Complete!")
|
||||
|
Reference in New Issue
Block a user