File tree 4 files changed +14
-15
lines changed
4 files changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -120,10 +120,3 @@ impl CheckedMul for int {
120
120
}
121
121
}
122
122
}
123
-
124
- #[ test]
125
- fn test_overflows ( ) {
126
- assert ! ( ( :: int:: MAX > 0 ) ) ;
127
- assert ! ( ( :: int:: MIN <= 0 ) ) ;
128
- assert ! ( ( :: int:: MIN + :: int:: MAX + 1 == 0 ) ) ;
129
- }
Original file line number Diff line number Diff line change @@ -445,6 +445,13 @@ mod tests {
445
445
use num:: CheckedDiv ;
446
446
use num:: Bitwise ;
447
447
448
+ #[ test]
449
+ fn test_overflows( ) {
450
+ assert!( MAX > 0 ) ;
451
+ assert!( MIN <= 0 ) ;
452
+ assert_eq!( MIN + MAX + 1 , 0 ) ;
453
+ }
454
+
448
455
#[ test]
449
456
fn test_num( ) {
450
457
num:: test_num( 10 as $T, 2 as $T) ;
Original file line number Diff line number Diff line change @@ -90,11 +90,3 @@ impl CheckedMul for uint {
90
90
}
91
91
}
92
92
}
93
-
94
- #[ test]
95
- fn test_overflows ( ) {
96
- use uint;
97
- assert ! ( ( uint:: MAX > 0 u) ) ;
98
- assert ! ( ( uint:: MIN <= 0 u) ) ;
99
- assert ! ( ( uint:: MIN + uint:: MAX + 1 u == 0 u) ) ;
100
- }
Original file line number Diff line number Diff line change @@ -317,6 +317,13 @@ mod tests {
317
317
use num:: Bitwise ;
318
318
use u16 ;
319
319
320
+ #[ test]
321
+ fn test_overflows( ) {
322
+ assert!( MAX > 0 ) ;
323
+ assert!( MIN <= 0 ) ;
324
+ assert_eq!( MIN + MAX + 1 , 0 ) ;
325
+ }
326
+
320
327
#[ test]
321
328
fn test_num( ) {
322
329
num:: test_num( 10 as $T, 2 as $T) ;
You can’t perform that action at this time.
0 commit comments