add tests for min
and max
from Float
This commit is contained in:
parent
8a55cd988f
commit
5973b0c4ad
@ -866,6 +866,18 @@ mod tests {
|
||||
use num::*;
|
||||
use num;
|
||||
|
||||
#[test]
|
||||
fn test_min_nan() {
|
||||
assert_eq!(NAN.min(2.0), 2.0);
|
||||
assert_eq!(2.0f32.min(NAN), 2.0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_max_nan() {
|
||||
assert_eq!(NAN.max(2.0), 2.0);
|
||||
assert_eq!(2.0f32.max(NAN), 2.0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_num() {
|
||||
num::test_num(10f32, 2f32);
|
||||
|
@ -865,6 +865,18 @@ mod tests {
|
||||
use num::*;
|
||||
use num;
|
||||
|
||||
#[test]
|
||||
fn test_min_nan() {
|
||||
assert_eq!(NAN.min(2.0), 2.0);
|
||||
assert_eq!(2.0f64.min(NAN), 2.0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_max_nan() {
|
||||
assert_eq!(NAN.max(2.0), 2.0);
|
||||
assert_eq!(2.0f64.max(NAN), 2.0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_num() {
|
||||
num::test_num(10f64, 2f64);
|
||||
|
Loading…
x
Reference in New Issue
Block a user