Sign in
fuchsia
/
third_party
/
rust
/
76d34f343508e7009c8c3ee40819c8d5031b6d50
/
.
/
src
/
librustc_data_structures
/
graph
/
iterate
/
tests.rs
blob: 6c7cfd6d8a7779852ac38d555c048e8cf7b06eee [
file
] [
log
] [
blame
]
use
super
::
super
::
tests
::
TestGraph
;
use
super
::*;
#[
test
]
fn
diamond_post_order
()
{
let
graph
=
TestGraph
::
new
(
0
,
&[(
0
,
1
),
(
0
,
2
),
(
1
,
3
),
(
2
,
3
)]);
let
result
=
post_order_from
(&
graph
,
0
);
assert_eq
!(
result
,
vec
![
3
,
1
,
2
,
0
]);
}