We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e37a1fd commit b3fcc34Copy full SHA for b3fcc34
1 file changed
lib/tests/integration_tests.rs
@@ -1,7 +1,6 @@
1
use expr_solver::{Eval, SymTable};
2
use indoc::indoc;
3
-use rust_decimal::Decimal;
4
-use rust_decimal::prelude::FromPrimitive;
+use rust_decimal::{Decimal, MathematicalOps};
5
use rust_decimal_macros::dec;
6
7
// Helper function to evaluate an expression and expect an Ok result.
@@ -65,10 +64,7 @@ fn test_constants() {
65
64
assert_eq!(eval_ok("pi"), Decimal::PI);
66
assert_eq!(eval_ok("e"), Decimal::E);
67
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
- );
+ assert_eq!(eval_ok("ln2"), Decimal::TWO.ln());
72
}
73
74
#[test]
0 commit comments