File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ struct TestObject {
158
158
159
159
#[ test]
160
160
fn all_the_fields ( ) {
161
- // All the fields currently generated as of 1.58 . This tries to exercise as
161
+ // All the fields currently generated as of 1.60 . This tries to exercise as
162
162
// much as possible.
163
163
let ver = cargo_version ( ) ;
164
164
let minimum = semver:: Version :: parse ( "1.56.0" ) . unwrap ( ) ;
@@ -332,7 +332,13 @@ fn all_the_fields() {
332
332
let build = get_file_name ! ( "build.rs" ) ;
333
333
assert_eq ! ( build. kind, vec![ "custom-build" ] ) ;
334
334
335
- assert_eq ! ( all. features. len( ) , 3 ) ;
335
+ if ver >= semver:: Version :: parse ( "1.60.0" ) . unwrap ( ) {
336
+ // 1.60 now reports optional dependencies within the features table
337
+ assert_eq ! ( all. features. len( ) , 4 ) ;
338
+ assert_eq ! ( all. features[ "bitflags" ] , vec![ "dep:bitflags" ] ) ;
339
+ } else {
340
+ assert_eq ! ( all. features. len( ) , 3 ) ;
341
+ }
336
342
assert_eq ! ( all. features[ "feat1" ] . len( ) , 0 ) ;
337
343
assert_eq ! ( all. features[ "feat2" ] . len( ) , 0 ) ;
338
344
assert_eq ! ( sorted!( all. features[ "default" ] ) , vec![ "bitflags" , "feat1" ] ) ;
You can’t perform that action at this time.
0 commit comments