Add validity checks to tests

This commit is contained in:
2023-08-24 14:44:21 +02:00
parent 383c92ec47
commit 1b4030d633
8 changed files with 150 additions and 4 deletions

View File

@ -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