Skip to content

Commit

Permalink
Update float.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
XAMPPRocky committed Oct 28, 2021
1 parent 029e755 commit 3703672
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/float.rs
Expand Up @@ -2282,7 +2282,7 @@ mod tests {
}

#[test]
#[cfg(any(feature = "std", feature = "libm"))]
#[cfg(any(feature = "std", feature = "libm"))]
fn copysign() {
use float::Float;
test_copysign_generic(2.0_f32, -2.0_f32, f32::nan());
Expand All @@ -2309,6 +2309,7 @@ mod tests {
assert!(nan.copysign(n).is_sign_negative());
}

#[cfg(any(feature = "std", feature = "libm"))]
fn test_copysign_generic<F: ::float::Float + core::fmt::Debug>(p: F, n: F, nan: F) {
assert!(p.is_sign_positive());
assert!(n.is_sign_negative());
Expand Down

0 comments on commit 3703672

Please sign in to comment.