File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -299,7 +299,11 @@ macro_rules! int_module {
299
299
assert_eq!( ( 2 as $T) . isqrt( ) , 1 as $T) ;
300
300
assert_eq!( ( 99 as $T) . isqrt( ) , 9 as $T) ;
301
301
assert_eq!( ( 100 as $T) . isqrt( ) , 10 as $T) ;
302
+ }
302
303
304
+ #[ cfg( not( miri) ) ] // Miri is too slow
305
+ #[ test]
306
+ fn test_lots_of_isqrt( ) {
303
307
let n_max: $T = ( 1024 * 1024 ) . min( $T:: MAX as u128 ) as $T;
304
308
for n in 0 ..=n_max {
305
309
let isqrt: $T = n. isqrt( ) ;
Original file line number Diff line number Diff line change @@ -214,7 +214,11 @@ macro_rules! uint_module {
214
214
assert_eq!( ( 99 as $T) . isqrt( ) , 9 as $T) ;
215
215
assert_eq!( ( 100 as $T) . isqrt( ) , 10 as $T) ;
216
216
assert_eq!( $T:: MAX . isqrt( ) , ( 1 << ( $T:: BITS / 2 ) ) - 1 ) ;
217
+ }
217
218
219
+ #[ cfg( not( miri) ) ] // Miri is too slow
220
+ #[ test]
221
+ fn test_lots_of_isqrt( ) {
218
222
let n_max: $T = ( 1024 * 1024 ) . min( $T:: MAX as u128 ) as $T;
219
223
for n in 0 ..=n_max {
220
224
let isqrt: $T = n. isqrt( ) ;
You can’t perform that action at this time.
0 commit comments