mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
add test for regression in CCGraph
This commit is contained in:
parent
858a360ab0
commit
38f5692e21
1 changed files with 15 additions and 0 deletions
|
|
@ -286,6 +286,21 @@ module Traverse = struct
|
|||
} in
|
||||
dfs_tag ?eq ~tags ~graph seq
|
||||
end
|
||||
|
||||
(*$R
|
||||
let l =
|
||||
Traverse.Event.dfs ~graph:divisors_graph (Sequence.return 345614)
|
||||
|> Sequence.to_list in
|
||||
let expected =
|
||||
[`Enter (345614, 0, []); `Edge (345614, (), 172807, `Forward);
|
||||
`Enter (172807, 1, [(345614, (), 172807)]); `Edge (172807, (), 1, `Forward);
|
||||
`Enter (1, 2, [(172807, (), 1); (345614, (), 172807)]); `Exit 1; `Exit 172807;
|
||||
`Edge (345614, (), 2, `Forward); `Enter (2, 3, [(345614, (), 2)]);
|
||||
`Edge (2, (), 1, `Cross); `Exit 2; `Edge (345614, (), 1, `Cross);
|
||||
`Exit 345614]
|
||||
in
|
||||
assert_equal expected l
|
||||
*)
|
||||
end
|
||||
|
||||
(** {2 Cycles} *)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue