@@ -82,7 +82,7 @@ pub fn main() {
8282 short. next ( ) ;
8383 assert_eq ! ( long. size_hint( ) , ( 255 , Some ( 255 ) ) ) ;
8484 assert_eq ! ( short. size_hint( ) , ( 0 , Some ( 0 ) ) ) ;
85- assert_eq ! ( short, RangeInclusive :: Empty { at : 42 } ) ;
85+ assert_eq ! ( short, 1 ... 0 ) ;
8686
8787 assert_eq ! ( long. len( ) , 255 ) ;
8888 assert_eq ! ( short. len( ) , 0 ) ;
@@ -97,28 +97,28 @@ pub fn main() {
9797 for i in 3 ...251 {
9898 assert_eq ! ( long. next( ) , Some ( i) ) ;
9999 }
100- assert_eq ! ( long, RangeInclusive :: Empty { at : 251 } ) ;
100+ assert_eq ! ( long, 1 ... 0 ) ;
101101
102102 // check underflow
103103 let mut narrow = 1 ...0 ;
104104 assert_eq ! ( narrow. next_back( ) , None ) ;
105- assert_eq ! ( narrow, RangeInclusive :: Empty { at : 0 } ) ;
105+ assert_eq ! ( narrow, 1 ... 0 ) ;
106106 let mut zero = 0u8 ...0 ;
107107 assert_eq ! ( zero. next_back( ) , Some ( 0 ) ) ;
108108 assert_eq ! ( zero. next_back( ) , None ) ;
109- assert_eq ! ( zero, RangeInclusive :: Empty { at : 0 } ) ;
109+ assert_eq ! ( zero, 1 ... 0 ) ;
110110 let mut high = 255u8 ...255 ;
111111 assert_eq ! ( high. next_back( ) , Some ( 255 ) ) ;
112112 assert_eq ! ( high. next_back( ) , None ) ;
113- assert_eq ! ( high, RangeInclusive :: Empty { at : 255 } ) ;
113+ assert_eq ! ( high, 1 ... 0 ) ;
114114
115115 // what happens if you have a nonsense range?
116116 let mut nonsense = 10 ...5 ;
117117 assert_eq ! ( nonsense. next( ) , None ) ;
118- assert_eq ! ( nonsense, RangeInclusive :: Empty { at : 10 } ) ;
118+ assert_eq ! ( nonsense, 10 ... 5 ) ;
119119
120120 // output
121121 assert_eq ! ( format!( "{:?}" , 0 ...10 ) , "0...10" ) ;
122122 assert_eq ! ( format!( "{:?}" , ...10 ) , "...10" ) ;
123- assert_eq ! ( format!( "{:?}" , long) , "[empty range @ 251] " ) ;
123+ assert_eq ! ( format!( "{:?}" , long) , "1...0 " ) ;
124124}
0 commit comments