test_promotion/
test_promotion.rs

1use ascii_dag::graph::DAG;
2
3fn main() {
4    let mut dag = DAG::new();
5
6    println!("=== Test: Auto-created Node Promotion ===\n");
7
8    dag.add_node(1, "Start");
9    dag.add_edge(1, 2); // Auto-creates node 2
10
11    println!("Before promotion (node 2 is auto-created):");
12    println!("{}\n", dag.render());
13
14    // Now promote node 2
15    dag.add_node(2, "Promoted");
16
17    println!("After promotion (node 2 now has label 'Promoted'):");
18    println!("{}\n", dag.render());
19
20    println!("✓ Node 2 successfully promoted from ⟨2⟩ to [Promoted]");
21}