#[cfg(test)] mod tests { #[test] fn add_nodes() { let stack = vec![Node::Leaf(true), Node::Leaf(false)]; let rhs = vec![Node::Binary { operator: Token::Conjunction, lhs: Box::new(Node::Leaf(true)), rhs: Box::new(Node::Leaf(false)) }]; assert_eq!(add_binary_node(&mut stack, Token::Conjunction), rhs); } }