Ignore less of the libcore float tests

This commit is contained in:
bjorn3 2020-06-20 15:29:12 +02:00
parent 5f54cc7658
commit 392348d3d1

View File

@ -34,21 +34,41 @@ diff --git a/src/libcore/tests/num/mod.rs b/src/libcore/tests/num/mod.rs
index a17c094..5bb11d2 100644
--- a/src/libcore/tests/num/mod.rs
+++ b/src/libcore/tests/num/mod.rs
@@ -640,6 +639,7 @@ macro_rules! test_float {
mod $modname {
// FIXME(nagisa): these tests should test for sign of -0.0
#[test]
+ #[ignore]
fn min() {
assert_eq!((0.0 as $fty).min(0.0), 0.0);
assert_eq!((-0.0 as $fty).min(-0.0), -0.0);
@@ -662,6 +662,7 @@ macro_rules! test_float {
assert!(($nan as $fty).min($nan).is_nan());
@@ -651,11 +651,12 @@ macro_rules! test_float {
assert_eq!((9.0 as $fty).min($neginf), $neginf);
assert_eq!(($neginf as $fty).min(-9.0), $neginf);
assert_eq!((-9.0 as $fty).min($neginf), $neginf);
- assert_eq!(($nan as $fty).min(9.0), 9.0);
- assert_eq!(($nan as $fty).min(-9.0), -9.0);
- assert_eq!((9.0 as $fty).min($nan), 9.0);
- assert_eq!((-9.0 as $fty).min($nan), -9.0);
- assert!(($nan as $fty).min($nan).is_nan());
+ // Cranelift fmin has NaN propagation
+ //assert_eq!(($nan as $fty).min(9.0), 9.0);
+ //assert_eq!(($nan as $fty).min(-9.0), -9.0);
+ //assert_eq!((9.0 as $fty).min($nan), 9.0);
+ //assert_eq!((-9.0 as $fty).min($nan), -9.0);
+ //assert!(($nan as $fty).min($nan).is_nan());
}
#[test]
+ #[ignore]
fn max() {
assert_eq!((0.0 as $fty).max(0.0), 0.0);
assert_eq!((-0.0 as $fty).max(-0.0), -0.0);
@@ -673,11 +674,12 @@ macro_rules! test_float {
assert_eq!((9.0 as $fty).max($neginf), 9.0);
assert_eq!(($neginf as $fty).max(-9.0), -9.0);
assert_eq!((-9.0 as $fty).max($neginf), -9.0);
- assert_eq!(($nan as $fty).max(9.0), 9.0);
- assert_eq!(($nan as $fty).max(-9.0), -9.0);
- assert_eq!((9.0 as $fty).max($nan), 9.0);
- assert_eq!((-9.0 as $fty).max($nan), -9.0);
- assert!(($nan as $fty).max($nan).is_nan());
+ // Cranelift fmax has NaN propagation
+ //assert_eq!(($nan as $fty).max(9.0), 9.0);
+ //assert_eq!(($nan as $fty).max(-9.0), -9.0);
+ //assert_eq!((9.0 as $fty).max($nan), 9.0);
+ //assert_eq!((-9.0 as $fty).max($nan), -9.0);
+ //assert!(($nan as $fty).max($nan).is_nan());
}
#[test]
fn rem_euclid() {
--
2.21.0 (Apple Git-122)