Skip to content

Commit b3fcc34

Browse files
committed
Fix tests
1 parent e37a1fd commit b3fcc34

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

lib/tests/integration_tests.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use expr_solver::{Eval, SymTable};
22
use indoc::indoc;
3-
use rust_decimal::Decimal;
4-
use rust_decimal::prelude::FromPrimitive;
3+
use rust_decimal::{Decimal, MathematicalOps};
54
use rust_decimal_macros::dec;
65

76
// Helper function to evaluate an expression and expect an Ok result.
@@ -65,10 +64,7 @@ fn test_constants() {
6564
assert_eq!(eval_ok("pi"), Decimal::PI);
6665
assert_eq!(eval_ok("e"), Decimal::E);
6766
assert_eq!(eval_ok("tau"), Decimal::TWO_PI);
68-
assert_eq!(
69-
eval_ok("ln2"),
70-
Decimal::from_f64(std::f64::consts::LN_2).unwrap()
71-
);
67+
assert_eq!(eval_ok("ln2"), Decimal::TWO.ln());
7268
}
7369

7470
#[test]

0 commit comments

Comments
 (0)