@@ -1131,6 +1131,11 @@ mod test_set {
1131
1131
check( a, b, expected, |x, y, z| x. intersection( y, z) )
1132
1132
}
1133
1133
1134
+ check_intersection( [ ] , [ ] , [ ] ) ;
1135
+ check_intersection( [ 1 , 2 , 3 ] , [ ] , [ ] ) ;
1136
+ check_intersection( [ ] , [ 1 , 2 , 3 ] , [ ] ) ;
1137
+ check_intersection( [ 2 ] , [ 1 , 2 , 3 ] , [ 2 ] ) ;
1138
+ check_intersection( [ 1 , 2 , 3 ] , [ 2 ] , [ 2 ] ) ;
1134
1139
check_intersection( [ 11 , 1 , 3 , 77 , 103 , 5 , -5 ] ,
1135
1140
[ 2 , 11 , 77 , -9 , -42 , 5 , 3 ] ,
1136
1141
[ 3 , 5 , 11 , 77 ] ) ;
@@ -1160,6 +1165,9 @@ mod test_set {
1160
1165
check( a, b, expected, |x, y, z| x. symmetric_difference( y, z) )
1161
1166
}
1162
1167
1168
+ check_symmetric_difference( [ ] , [ ] , [ ] ) ;
1169
+ check_symmetric_difference( [ 1 , 2 , 3 ] , [ 2 ] , [ 1 , 3 ] ) ;
1170
+ check_symmetric_difference( [ 2 ] , [ 1 , 2 , 3 ] , [ 1 , 3 ] ) ;
1163
1171
check_symmetric_difference( [ 1 , 3 , 5 , 9 , 11 ] ,
1164
1172
[ -2 , 3 , 9 , 14 , 22 ] ,
1165
1173
[ -2 , 1 , 5 , 11 , 14 , 22 ] ) ;
@@ -1172,6 +1180,8 @@ mod test_set {
1172
1180
check( a, b, expected, |x, y, z| x. union ( y, z) )
1173
1181
}
1174
1182
1183
+ check_union( [ ] , [ ] , [ ] ) ;
1184
+ check_union( [ 1 , 2 , 3 ] , [ 2 ] , [ 1 , 2 , 3 ] ) ;
1175
1185
check_union( [ 1 , 3 , 5 , 9 , 11 , 16 , 19 , 24 ] ,
1176
1186
[ -2 , 1 , 5 , 9 , 13 , 19 ] ,
1177
1187
[ -2 , 1 , 3 , 5 , 9 , 11 , 13 , 16 , 19 , 24 ] ) ;
0 commit comments