@@ -24,15 +24,15 @@ fn checked_ilog() {
2424
2525#[ cfg( not( miri) ) ] // Miri is too slow
2626for iin i16:: MIN ..=0 {
27- assert_eq ! ( i. checked_ilog( 4 ) , None ) ;
27+ assert_eq ! ( i. checked_ilog( 4 ) , None , "checking {i}" ) ;
2828}
2929#[ cfg( not( miri) ) ] // Miri is too slow
3030for iin 1 ..=i16:: MAX {
31- assert_eq ! ( i. checked_ilog( 13 ) , Some ( ( ias f32 ) . log( 13.0 ) as u32 ) ) ;
31+ assert_eq ! ( i. checked_ilog( 13 ) , Some ( ( ias f32 ) . log( 13.0 ) as u32 ) , "checking {i}" ) ;
3232}
3333#[ cfg( not( miri) ) ] // Miri is too slow
3434for iin 1 ..=u16:: MAX {
35- assert_eq ! ( i. checked_ilog( 13 ) , Some ( ( ias f32 ) . log( 13.0 ) as u32 ) ) ;
35+ assert_eq ! ( i. checked_ilog( 13 ) , Some ( ( ias f32 ) . log( 13.0 ) as u32 ) , "checking {i}" ) ;
3636}
3737}
3838
@@ -49,30 +49,30 @@ fn checked_ilog2() {
4949assert_eq ! ( 0i16 . checked_ilog2( ) , None ) ;
5050
5151for iin 1 ..=u8:: MAX {
52- assert_eq ! ( i. checked_ilog2( ) , Some ( ( ias f32 ) . log2( ) as u32 ) ) ;
52+ assert_eq ! ( i. checked_ilog2( ) , Some ( ( ias f32 ) . log2( ) as u32 ) , "checking {i}" ) ;
5353}
5454#[ cfg( not( miri) ) ] // Miri is too slow
5555for iin 1 ..=u16:: MAX {
5656// Guard against Android's imprecise f32::ilog2 implementation.
5757if i !=8192 && i !=32768 {
58- assert_eq ! ( i. checked_ilog2( ) , Some ( ( ias f32 ) . log2( ) as u32 ) ) ;
58+ assert_eq ! ( i. checked_ilog2( ) , Some ( ( ias f32 ) . log2( ) as u32 ) , "checking {i}" ) ;
5959}
6060}
6161for iin i8:: MIN ..=0 {
62- assert_eq ! ( i. checked_ilog2( ) , None ) ;
62+ assert_eq ! ( i. checked_ilog2( ) , None , "checking {i}" ) ;
6363}
6464for iin 1 ..=i8:: MAX {
65- assert_eq ! ( i. checked_ilog2( ) , Some ( ( ias f32 ) . log2( ) as u32 ) ) ;
65+ assert_eq ! ( i. checked_ilog2( ) , Some ( ( ias f32 ) . log2( ) as u32 ) , "checking {i}" ) ;
6666}
6767#[ cfg( not( miri) ) ] // Miri is too slow
6868for iin i16:: MIN ..=0 {
69- assert_eq ! ( i. checked_ilog2( ) , None ) ;
69+ assert_eq ! ( i. checked_ilog2( ) , None , "checking {i}" ) ;
7070}
7171#[ cfg( not( miri) ) ] // Miri is too slow
7272for iin 1 ..=i16:: MAX {
7373// Guard against Android's imprecise f32::ilog2 implementation.
7474if i !=8192 {
75- assert_eq ! ( i. checked_ilog2( ) , Some ( ( ias f32 ) . log2( ) as u32 ) ) ;
75+ assert_eq ! ( i. checked_ilog2( ) , Some ( ( ias f32 ) . log2( ) as u32 ) , "checking {i}" ) ;
7676}
7777}
7878}
@@ -95,19 +95,19 @@ fn checked_ilog10() {
9595
9696#[ cfg( not( miri) ) ] // Miri is too slow
9797for iin i16:: MIN ..=0 {
98- assert_eq ! ( i. checked_ilog10( ) , None ) ;
98+ assert_eq ! ( i. checked_ilog10( ) , None , "checking {i}" ) ;
9999}
100100#[ cfg( not( miri) ) ] // Miri is too slow
101101for iin 1 ..=i16:: MAX {
102- assert_eq ! ( i. checked_ilog10( ) , Some ( ( ias f32 ) . log10( ) as u32 ) ) ;
102+ assert_eq ! ( i. checked_ilog10( ) , Some ( ( ias f32 ) . log10( ) as u32 ) , "checking {i}" ) ;
103103}
104104#[ cfg( not( miri) ) ] // Miri is too slow
105105for iin 1 ..=u16:: MAX {
106- assert_eq ! ( i. checked_ilog10( ) , Some ( ( ias f32 ) . log10( ) as u32 ) ) ;
106+ assert_eq ! ( i. checked_ilog10( ) , Some ( ( ias f32 ) . log10( ) as u32 ) , "checking {i}" ) ;
107107}
108108#[ cfg( not( miri) ) ] // Miri is too slow
109109for iin 1 ..=100_000u32 {
110- assert_eq ! ( i. checked_ilog10( ) , Some ( ( ias f32 ) . log10( ) as u32 ) ) ;
110+ assert_eq ! ( i. checked_ilog10( ) , Some ( ( ias f32 ) . log10( ) as u32 ) , "checking {i}" ) ;
111111}
112112}
113113