File tree 1 file changed +2
-7
lines changed
1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 1
- //! This tests the `Integer::{ilog,log2,log10}` methods. These tests are in a
2
- //! separate file because there's both a large number of them, and not all tests
3
- //! can be run on Android. This is because in Android `ilog2` uses an imprecise
4
- //! approximation:https://github.com/rust-lang/rust/blob/4825e12fc9c79954aa0fe18f5521efa6c19c7539/src/libstd/sys/unix/android.rs#L27-L53
1
+ //! Tests for the `Integer::{ilog,log2,log10}` methods.
5
2
6
3
#[ test]
7
4
fn checked_ilog ( ) {
@@ -77,10 +74,8 @@ fn checked_ilog2() {
77
74
}
78
75
}
79
76
80
- // Validate cases that fail on Android's imprecise float ilog2 implementation.
81
77
#[ test]
82
- #[ cfg( not( target_os = "android" ) ) ]
83
- fn checked_ilog2_not_android ( ) {
78
+ fn checked_ilog2 ( ) {
84
79
assert_eq ! ( 8192u16 . checked_ilog2( ) , Some ( ( 8192f32 ) . log2( ) as u32 ) ) ;
85
80
assert_eq ! ( 32768u16 . checked_ilog2( ) , Some ( ( 32768f32 ) . log2( ) as u32 ) ) ;
86
81
assert_eq ! ( 8192i16 . checked_ilog2( ) , Some ( ( 8192f32 ) . log2( ) as u32 ) ) ;
You can’t perform that action at this time.
0 commit comments