diff --git a/src/nodes/tests.rs b/src/nodes/tests.rs index 9e3202b..4c3caa6 100644 --- a/src/nodes/tests.rs +++ b/src/nodes/tests.rs @@ -4,6 +4,18 @@ use rug::Float; use crate::nodes::{Function, Node, Nodes, Operator, PREC}; +#[test] +fn constants() { + assert_eq!( + Nodes::from_str("c").unwrap().evaluate().to_f64(), + 299792458. + ); + assert_eq!( + Nodes::from_str("A").unwrap().evaluate().to_f64(), + 6.02214076e23 + ); +} + #[test] fn unary_operators() { assert_eq!(Nodes::from_str("-10").unwrap().evaluate().to_f64(), -10.);