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 cabfb0b commit 70b5c57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/float.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2304,7 +2304,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 @@ -2331,6 +2331,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 70b5c57

Please sign in to comment.