From 757e854d450ffe00c2110de3343aca939474bb4a Mon Sep 17 00:00:00 2001 From: Rendo Date: Mon, 10 Nov 2025 08:34:44 +0500 Subject: [PATCH] test error inspection --- src/tests.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tests.rs b/src/tests.rs index 2f5674c..d195ed8 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -22,6 +22,7 @@ fn test_plus_one() { ), None ) + .inspect_err(|x| println!("{x}")) .is_ok() ); let results = formula.run(vec![0f64, 1f64, 2f64, 3f64, 4f64, 5f64]); @@ -38,6 +39,7 @@ fn test_branch_sum() { Node::function("Sum".to_string(), |inputs| inputs.iter().sum(), Some(2), 0), None ) + .inspect_err(|x| println!("{x}")) .is_ok() ); assert!( @@ -61,6 +63,7 @@ fn test_display_as_text() { Node::function("sum".to_string(), |inputs| inputs.iter().sum(), None, 0), None ) + .inspect_err(|x| println!("{x}")) .is_ok() ); assert!( @@ -73,6 +76,7 @@ fn test_display_as_text() { Some(1), 0 )) + .inspect_err(|x| println!("{x}")) .is_ok() ); assert!( @@ -81,6 +85,7 @@ fn test_display_as_text() { .go_down(0) .go_down(1) .add_node(Node::variable()) + .inspect_err(|x| println!("{x}")) .is_ok() ); assert_eq!(formula.as_text(), "sum(X,sin(X))".to_string());