From 0d036a7ebfca48a516021d04f797956cc7e0fd00 Mon Sep 17 00:00:00 2001 From: Brad Clawsie Date: Mon, 16 Nov 2026 15:37:17 -0600 Subject: fix: test --- learn_13/src/main.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'learn_13/src/main.rs') diff --git a/learn_13/src/main.rs b/learn_13/src/main.rs index eb930c6..cf05f5b 100644 --- a/learn_13/src/main.rs +++ b/learn_13/src/main.rs @@ -108,6 +108,14 @@ mod tests { )), ); assert_eq!(expr.depth(), 3); + + let expr2 = Expr::Negate(Box::new( + Expr::Add( + Box::new(Expr::Number(1)), + Box::new(Expr::Number(2)), + ), + )); + assert_eq!(expr2.depth(), 3); } #[test] @@ -135,5 +143,13 @@ mod tests { )), ); assert_eq!(expr.node_count(), 6); + + let expr2 = Expr::Negate(Box::new( + Expr::Add( + Box::new(Expr::Number(1)), + Box::new(Expr::Number(2)), + ), + )); + assert_eq!(expr2.node_count(), 4); } } -- cgit v1.2.3