Skip to content

Commit

Permalink
Update float.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
XAMPPRocky authored and cuviper committed Apr 30, 2022
1 parent 7ca2456 commit cabfb0b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/float.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2304,14 +2304,17 @@ mod tests {
}

#[test]
#[cfg(any(feature = "std", feature = "libm"))]
fn copysign() {
use float::Float;
test_copysign_generic(2.0_f32, -2.0_f32, f32::nan());
test_copysign_generic(2.0_f64, -2.0_f64, f64::nan());
test_copysignf(2.0_f32, -2.0_f32, f32::nan());
}

#[cfg(any(feature = "std", feature = "libm"))]
fn test_copysignf(p: f32, n: f32, nan: f32) {
use float::Float;
use core::ops::Neg;

assert!(p.is_sign_positive());
Expand Down

0 comments on commit cabfb0b

Please sign in to comment.