()
| 333 | |
| 334 | #[test] |
| 335 | fn chain_of_three() { |
| 336 | // A -> B -> C via data dependencies. |
| 337 | let mut graph = Graph::new(); |
| 338 | graph.push(PassNode::new("C", record("C")) |
| 339 | .with_reads(&[PassInput::Transient(1)])); |
| 340 | graph.push(PassNode::new("A", record("A")) |
| 341 | .with_writes(&[PassOutput::HdrColor])); |
| 342 | graph.push(PassNode::new("B", record("B")) |
| 343 | .with_reads(&[PassInput::SceneColor]) |
| 344 | .with_writes(&[PassOutput::Transient(1)])); |
| 345 | let mut ctx = Vec::new(); |
| 346 | graph.execute(&mut ctx).unwrap(); |
| 347 | assert_eq!(ctx, vec!["A", "B", "C"]); |
| 348 | } |
| 349 | |
| 350 | #[test] |
| 351 | fn parallel_branches_deterministic_by_declaration_order() { |
nothing calls this directly
no test coverage detected