@@ -14,7 +14,7 @@ use crate::support::resolver::{
14
14
15
15
use proptest:: { prelude:: * , * } ;
16
16
17
- /// NOTE: proptest is a form of fuzz testing. It generates random input and makes shore that
17
+ /// NOTE: proptest is a form of fuzz testing. It generates random input and makes sure that
18
18
/// certain universal truths are upheld. Therefore, it can pass when there is a problem,
19
19
/// but if it fails then there really is something wrong. When testing something as
20
20
/// complicated as the resolver, the problems can be very subtle and hard to generate.
@@ -41,7 +41,7 @@ proptest! {
41
41
PrettyPrintRegistry ( input) in registry_strategy( 50 , 20 , 60 )
42
42
) {
43
43
let reg = registry( input. clone( ) ) ;
44
- // there is only a small chance that eny one
44
+ // there is only a small chance that any one
45
45
// crate will be interesting.
46
46
// So we try some of the most complicated.
47
47
for this in input. iter( ) . rev( ) . take( 20 ) {
@@ -74,7 +74,7 @@ proptest! {
74
74
. unwrap( ) ;
75
75
76
76
let reg = registry( input. clone( ) ) ;
77
- // there is only a small chance that eny one
77
+ // there is only a small chance that any one
78
78
// crate will be interesting.
79
79
// So we try some of the most complicated.
80
80
for this in input. iter( ) . rev( ) . take( 10 ) {
@@ -105,13 +105,13 @@ proptest! {
105
105
106
106
/// NOTE: if you think this test has failed spuriously see the note at the top of this macro.
107
107
#[ test]
108
- fn removing_a_dep_cant_brake (
108
+ fn removing_a_dep_cant_break (
109
109
PrettyPrintRegistry ( input) in registry_strategy( 50 , 20 , 60 ) ,
110
- indexs_to_remove in collection:: vec( ( any:: <prop:: sample:: Index >( ) , any:: <prop:: sample:: Index >( ) ) , ..10 )
110
+ indexes_to_remove in collection:: vec( ( any:: <prop:: sample:: Index >( ) , any:: <prop:: sample:: Index >( ) ) , ..10 )
111
111
) {
112
112
let reg = registry( input. clone( ) ) ;
113
113
let mut removed_input = input. clone( ) ;
114
- for ( summery_idx, dep_idx) in indexs_to_remove {
114
+ for ( summery_idx, dep_idx) in indexes_to_remove {
115
115
if removed_input. len( ) > 0 {
116
116
let summery_idx = summery_idx. index( removed_input. len( ) ) ;
117
117
let deps = removed_input[ summery_idx] . dependencies( ) ;
@@ -122,7 +122,7 @@ proptest! {
122
122
}
123
123
}
124
124
let removed_reg = registry( removed_input) ;
125
- // there is only a small chance that eny one
125
+ // there is only a small chance that any one
126
126
// crate will be interesting.
127
127
// So we try some of the most complicated.
128
128
for this in input. iter( ) . rev( ) . take( 10 ) {
@@ -149,10 +149,10 @@ proptest! {
149
149
#[ test]
150
150
fn limited_independence_of_irrelevant_alternatives(
151
151
PrettyPrintRegistry ( input) in registry_strategy( 50 , 20 , 60 ) ,
152
- indexs_to_unpublish in collection:: vec( any:: <prop:: sample:: Index >( ) , ..10 )
152
+ indexes_to_unpublish in collection:: vec( any:: <prop:: sample:: Index >( ) , ..10 )
153
153
) {
154
154
let reg = registry( input. clone( ) ) ;
155
- // there is only a small chance that eny one
155
+ // there is only a small chance that any one
156
156
// crate will be interesting.
157
157
// So we try some of the most complicated.
158
158
for this in input. iter( ) . rev( ) . take( 10 ) {
@@ -172,13 +172,13 @@ proptest! {
172
172
. filter( |x| !r. contains( & x. package_id( ) ) )
173
173
. collect( ) ;
174
174
if !not_selected. is_empty( ) {
175
- let indexs_to_unpublish : Vec <_> = indexs_to_unpublish . iter( ) . map( |x| x. get( & not_selected) ) . collect( ) ;
175
+ let indexes_to_unpublish : Vec <_> = indexes_to_unpublish . iter( ) . map( |x| x. get( & not_selected) ) . collect( ) ;
176
176
177
177
let new_reg = registry(
178
178
input
179
179
. iter( )
180
180
. cloned( )
181
- . filter( |x| !indexs_to_unpublish . contains( & x) )
181
+ . filter( |x| !indexes_to_unpublish . contains( & x) )
182
182
. collect( ) ,
183
183
) ;
184
184
@@ -196,7 +196,7 @@ proptest! {
196
196
prop_assert!(
197
197
res. is_ok( ) ,
198
198
"unpublishing {:?} stopped `{} = \" ={}\" ` from working" ,
199
- indexs_to_unpublish . iter( ) . map( |x| x. package_id( ) ) . collect:: <Vec <_>>( ) ,
199
+ indexes_to_unpublish . iter( ) . map( |x| x. package_id( ) ) . collect:: <Vec <_>>( ) ,
200
200
this. name( ) ,
201
201
this. version( )
202
202
)
@@ -206,13 +206,13 @@ proptest! {
206
206
Err ( _) => {
207
207
// If resolution was unsuccessful, then it should stay unsuccessful
208
208
// even if any version of a crate is unpublished.
209
- let indexs_to_unpublish : Vec <_> = indexs_to_unpublish . iter( ) . map( |x| x. get( & input) ) . collect( ) ;
209
+ let indexes_to_unpublish : Vec <_> = indexes_to_unpublish . iter( ) . map( |x| x. get( & input) ) . collect( ) ;
210
210
211
211
let new_reg = registry(
212
212
input
213
213
. iter( )
214
214
. cloned( )
215
- . filter( |x| !indexs_to_unpublish . contains( & x) )
215
+ . filter( |x| !indexes_to_unpublish . contains( & x) )
216
216
. collect( ) ,
217
217
) ;
218
218
@@ -227,7 +227,7 @@ proptest! {
227
227
"full index did not work for `{} = \" ={}\" ` but unpublishing {:?} fixed it!" ,
228
228
this. name( ) ,
229
229
this. version( ) ,
230
- indexs_to_unpublish . iter( ) . map( |x| x. package_id( ) ) . collect:: <Vec <_>>( ) ,
230
+ indexes_to_unpublish . iter( ) . map( |x| x. package_id( ) ) . collect:: <Vec <_>>( ) ,
231
231
)
232
232
}
233
233
}
0 commit comments