Skip to content

Commit dcff7d2

Browse files
VoidStarKatAlexhuszagh
authored andcommitted
Ignore some tests in miri (due to diff floating point handling)
1 parent d182210 commit dcff7d2

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/bfloat.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,6 +1689,7 @@ mod test {
16891689
}
16901690

16911691
#[test]
1692+
#[cfg_attr(miri, ignore)]
16921693
fn test_bf16_to_f64() {
16931694
let f = bf16::from_f64(7.0);
16941695
assert_eq!(f.to_f64(), 7.0f64);
@@ -1762,6 +1763,7 @@ mod test {
17621763

17631764
#[test]
17641765
#[allow(clippy::erasing_op, clippy::identity_op)]
1766+
#[cfg_attr(miri, ignore)]
17651767
fn round_to_even_f32() {
17661768
// smallest positive subnormal = 0b0.0000_001 * 2^-126 = 2^-133
17671769
let min_sub = bf16::from_bits(1);
@@ -1803,6 +1805,7 @@ mod test {
18031805

18041806
#[test]
18051807
#[allow(clippy::erasing_op, clippy::identity_op)]
1808+
#[cfg_attr(miri, ignore)]
18061809
fn round_to_even_f64() {
18071810
// smallest positive subnormal = 0b0.0000_001 * 2^-126 = 2^-133
18081811
let min_sub = bf16::from_bits(1);

src/binary16.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,6 +1563,7 @@ mod test {
15631563
use super::*;
15641564

15651565
#[test]
1566+
#[cfg_attr(miri, ignore)]
15661567
fn test_f16_consts() {
15671568
// DIGITS
15681569
let digits = ((f16::MANTISSA_DIGITS as f32 - 1.0) * 2f32.log10()).floor() as u32;
@@ -1790,6 +1791,7 @@ mod test {
17901791
}
17911792

17921793
#[test]
1794+
#[cfg_attr(miri, ignore)]
17931795
fn test_f16_to_f32() {
17941796
let f = f16::from_f32(7.0);
17951797
assert_eq!(f.to_f32(), 7.0f32);
@@ -1808,6 +1810,7 @@ mod test {
18081810
}
18091811

18101812
#[test]
1813+
#[cfg_attr(miri, ignore)]
18111814
fn test_f16_to_f64() {
18121815
let f = f16::from_f64(7.0);
18131816
assert_eq!(f.to_f64(), 7.0f64);
@@ -1880,6 +1883,7 @@ mod test {
18801883

18811884
#[test]
18821885
#[allow(clippy::erasing_op, clippy::identity_op)]
1886+
#[cfg_attr(miri, ignore)]
18831887
fn round_to_even_f32() {
18841888
// smallest positive subnormal = 0b0.0000_0000_01 * 2^-14 = 2^-24
18851889
let min_sub = f16::from_bits(1);
@@ -1921,6 +1925,7 @@ mod test {
19211925

19221926
#[test]
19231927
#[allow(clippy::erasing_op, clippy::identity_op)]
1928+
#[cfg_attr(miri, ignore)]
19241929
fn round_to_even_f64() {
19251930
// smallest positive subnormal = 0b0.0000_0000_01 * 2^-14 = 2^-24
19261931
let min_sub = f16::from_bits(1);

0 commit comments

Comments
 (0)