Skip to content

Commit e698ee8

Browse files
committed
Ignore some tests in miri (due to diff floating point handling)
1 parent c491109 commit e698ee8

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/bfloat.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,6 +1571,7 @@ mod test {
15711571
}
15721572

15731573
#[test]
1574+
#[cfg_attr(miri, ignore)]
15741575
fn test_bf16_to_f64() {
15751576
let f = bf16::from_f64(7.0);
15761577
assert_eq!(f.to_f64(), 7.0f64);
@@ -1644,6 +1645,7 @@ mod test {
16441645

16451646
#[test]
16461647
#[allow(clippy::erasing_op, clippy::identity_op)]
1648+
#[cfg_attr(miri, ignore)]
16471649
fn round_to_even_f32() {
16481650
// smallest positive subnormal = 0b0.0000_001 * 2^-126 = 2^-133
16491651
let min_sub = bf16::from_bits(1);
@@ -1739,6 +1741,7 @@ mod test {
17391741

17401742
#[test]
17411743
#[allow(clippy::erasing_op, clippy::identity_op)]
1744+
#[cfg_attr(miri, ignore)]
17421745
fn round_to_even_f64() {
17431746
// smallest positive subnormal = 0b0.0000_001 * 2^-126 = 2^-133
17441747
let min_sub = bf16::from_bits(1);

src/binary16.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,6 +1394,7 @@ mod test {
13941394
}
13951395

13961396
#[test]
1397+
#[cfg_attr(miri, ignore)]
13971398
fn test_f16_consts() {
13981399
// DIGITS
13991400
let digits = ((f16::MANTISSA_DIGITS as f32 - 1.0) * 2f32.log10()).floor() as u32;
@@ -1621,6 +1622,7 @@ mod test {
16211622
}
16221623

16231624
#[test]
1625+
#[cfg_attr(miri, ignore)]
16241626
fn test_f16_to_f32() {
16251627
let f = f16::from_f32(7.0);
16261628
assert_eq!(f.to_f32(), 7.0f32);
@@ -1642,6 +1644,7 @@ mod test {
16421644
}
16431645

16441646
#[test]
1647+
#[cfg_attr(miri, ignore)]
16451648
fn test_f16_to_f64() {
16461649
let f = f16::from_f64(7.0);
16471650
assert_eq!(f.to_f64(), 7.0f64);
@@ -1717,6 +1720,7 @@ mod test {
17171720

17181721
#[test]
17191722
#[allow(clippy::erasing_op, clippy::identity_op)]
1723+
#[cfg_attr(miri, ignore)]
17201724
fn round_to_even_f32() {
17211725
// smallest positive subnormal = 0b0.0000_0000_01 * 2^-14 = 2^-24
17221726
let min_sub = f16::from_bits(1);
@@ -1812,6 +1816,7 @@ mod test {
18121816

18131817
#[test]
18141818
#[allow(clippy::erasing_op, clippy::identity_op)]
1819+
#[cfg_attr(miri, ignore)]
18151820
fn round_to_even_f64() {
18161821
// smallest positive subnormal = 0b0.0000_0000_01 * 2^-14 = 2^-24
18171822
let min_sub = f16::from_bits(1);

0 commit comments

Comments
 (0)