Extra little conversion check.

This commit is contained in:
2019-01-01 20:47:40 -08:00
parent a4ead1ec3d
commit 6268491168

View File

@@ -64,6 +64,15 @@ macro_rules! generate_sigconversion_tests
fn conversion_i32( x: i32) -> bool { x == i32::from($sname::from(x)) }
fn conversion_i64( x: i64) -> bool { x == i64::from($sname::from(x)) }
fn conversion_isize(x: isize) -> bool { x == isize::from($sname::from(x)) }
fn back_conversion(x: u64, b: bool) -> bool
{
let mut base = $sname::zero();
let xprime = x & 0x7FFFFFFFFFFFFFFF;
base.negative = b;
base.value.value[0] = xprime;
base == $sname::from(i64::from(&base))
}
}
}
}