()
| 354 | |
| 355 | #[test] |
| 356 | fn three_way_fork() { |
| 357 | let verts = [ |
| 358 | GraphNode::BOTTOM, |
| 359 | make_vertex(1, 0, 10), |
| 360 | make_vertex(2, 0, 5), |
| 361 | make_vertex(3, 0, 7), |
| 362 | make_vertex(4, 0, 3), |
| 363 | ]; |
| 364 | let graph = build_graph(&verts, 1, &[2, 3, 4]); |
| 365 | |
| 366 | let order = OrderResult { |
| 367 | sccs: vec![ |
| 368 | vec![VertexId(1)], |
| 369 | vec![VertexId(2)], |
| 370 | vec![VertexId(3)], |
| 371 | vec![VertexId(4)], |
| 372 | ], |
| 373 | conflict_tree: Default::default(), |
| 374 | cyclic_conflicts: 0, |
| 375 | forward_edges: Vec::new(), |
| 376 | }; |
| 377 | |
| 378 | let forks = detect_fork_conflicts(&graph, &order).unwrap(); |
| 379 | assert_eq!(forks.len(), 1); |
| 380 | assert_eq!(forks[0].children.len(), 3); |
| 381 | } |
| 382 | |
| 383 | #[test] |
| 384 | fn no_children_at_all() { |
nothing calls this directly
no test coverage detected