Add validity checks to tests
This commit is contained in:
@ -47,6 +47,8 @@ function test_random_walk(g::DAG, n::Int64)
|
||||
# the purpose here is to do "random" operations and reverse them again and validate that the graph stays the same and doesn't diverge
|
||||
reset_graph!(g)
|
||||
|
||||
@test is_valid(g)
|
||||
|
||||
properties = graph_properties(g)
|
||||
|
||||
for i = 1:n
|
||||
@ -78,6 +80,8 @@ function test_random_walk(g::DAG, n::Int64)
|
||||
|
||||
reset_graph!(g)
|
||||
|
||||
@test is_valid(g)
|
||||
|
||||
@test properties == graph_properties(g)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user