diff --git a/tests/test_rand.rs b/tests/test_rand.rs index dffabe9..b7f9078 100644 --- a/tests/test_rand.rs +++ b/tests/test_rand.rs @@ -34,7 +34,13 @@ fn test_rand() -> Result<(), Box> { let first = engine.eval::("rand_decimal()")?; let second = engine.eval::("rand_decimal()")?; - println!("{}, {}", first, second); + assert!(first != second); + + let first = + engine.eval::("rand_decimal(123.456.to_decimal(), 789.234.to_decimal())")?; + let second = + engine.eval::("rand_decimal(123.456.to_decimal(), 789.234.to_decimal())")?; + assert!(first != second); } @@ -44,6 +50,13 @@ fn test_rand() -> Result<(), Box> { println!("Random number = {}", value); } + #[cfg(feature = "float")] + for _ in 0..10 { + let value = engine.eval::("rand_float()")?; + + println!("Random float = {}", value); + } + Ok(()) }