@@ -16,6 +16,7 @@ fn list_move_next_to_front() {
1616 let mut vec: Vec < _ > = ( 0 ..n) . into_iter ( ) . filter ( |x| x != & i) . collect ( ) ;
1717 vec. insert ( 1 , i) ;
1818
19+ #[ cfg( feature = "validation" ) ]
1920 list. validate ( ) ;
2021 assert ! ( list. eq_to_iter_refs( & vec) ) ;
2122 }
@@ -33,6 +34,7 @@ fn list_move_next_to_back() {
3334
3435 dbg ! ( i, & vec, list. iter( ) . collect:: <Vec <_>>( ) ) ;
3536
37+ #[ cfg( feature = "validation" ) ]
3638 list. validate ( ) ;
3739 assert ! ( list. eq_to_iter_refs( & vec) ) ;
3840 }
@@ -42,16 +44,19 @@ fn list_move_next_to_back() {
4244fn list_move_next_front_prev_to_arbitrary ( ) {
4345 let ( mut list, idx) = list_and_indices ( 5 ) ;
4446 list. move_next_to ( & idx[ 0 ] , & idx[ 2 ] ) ;
47+ #[ cfg( feature = "validation" ) ]
4548 list. validate ( ) ;
4649 assert ! ( list. eq_to_iter_vals( [ 1 , 2 , 0 , 3 , 4 ] ) ) ;
4750
4851 let ( mut list, idx) = list_and_indices ( 5 ) ;
4952 list. move_next_to ( & idx[ 0 ] , & idx[ 3 ] ) ;
53+ #[ cfg( feature = "validation" ) ]
5054 list. validate ( ) ;
5155 assert ! ( list. eq_to_iter_vals( [ 1 , 2 , 3 , 0 , 4 ] ) ) ;
5256
5357 let ( mut list, idx) = list_and_indices ( 5 ) ;
5458 list. move_next_to ( & idx[ 0 ] , & idx[ 4 ] ) ;
59+ #[ cfg( feature = "validation" ) ]
5560 list. validate ( ) ;
5661 assert ! ( list. eq_to_iter_vals( [ 1 , 2 , 3 , 4 , 0 ] ) ) ;
5762}
@@ -60,16 +65,19 @@ fn list_move_next_front_prev_to_arbitrary() {
6065fn list_move_next_back_prev_to_arbitrary ( ) {
6166 let ( mut list, idx) = list_and_indices ( 5 ) ;
6267 list. move_next_to ( & idx[ 4 ] , & idx[ 2 ] ) ;
68+ #[ cfg( feature = "validation" ) ]
6369 list. validate ( ) ;
6470 assert ! ( list. eq_to_iter_vals( [ 0 , 1 , 2 , 4 , 3 ] ) ) ;
6571
6672 let ( mut list, idx) = list_and_indices ( 5 ) ;
6773 list. move_next_to ( & idx[ 4 ] , & idx[ 0 ] ) ;
74+ #[ cfg( feature = "validation" ) ]
6875 list. validate ( ) ;
6976 assert ! ( list. eq_to_iter_vals( [ 0 , 4 , 1 , 2 , 3 ] ) ) ;
7077
7178 let ( mut list, idx) = list_and_indices ( 5 ) ;
7279 list. move_next_to ( & idx[ 4 ] , & idx[ 1 ] ) ;
80+ #[ cfg( feature = "validation" ) ]
7381 list. validate ( ) ;
7482 assert ! ( list. eq_to_iter_vals( [ 0 , 1 , 4 , 2 , 3 ] ) ) ;
7583}
@@ -78,16 +86,19 @@ fn list_move_next_back_prev_to_arbitrary() {
7886fn list_move_next_to_arbitrary ( ) {
7987 let ( mut list, idx) = list_and_indices ( 5 ) ;
8088 list. move_next_to ( & idx[ 3 ] , & idx[ 2 ] ) ;
89+ #[ cfg( feature = "validation" ) ]
8190 list. validate ( ) ;
8291 assert ! ( list. eq_to_iter_vals( [ 0 , 1 , 2 , 3 , 4 ] ) ) ;
8392
8493 let ( mut list, idx) = list_and_indices ( 5 ) ;
8594 list. move_next_to ( & idx[ 3 ] , & idx[ 0 ] ) ;
95+ #[ cfg( feature = "validation" ) ]
8696 list. validate ( ) ;
8797 assert ! ( list. eq_to_iter_vals( [ 0 , 3 , 1 , 2 , 4 ] ) ) ;
8898
8999 let ( mut list, idx) = list_and_indices ( 5 ) ;
90100 list. move_next_to ( & idx[ 1 ] , & idx[ 3 ] ) ;
101+ #[ cfg( feature = "validation" ) ]
91102 list. validate ( ) ;
92103 assert ! ( list. eq_to_iter_vals( [ 0 , 2 , 3 , 1 , 4 ] ) ) ;
93104}
0 commit comments