@@ -251,33 +251,34 @@ fn cfg_expr_bad() {
251251
252252#[ test]
253253fn cfg_matches ( ) {
254- assert ! ( e!( foo) . matches( & [ c!( bar) , c!( foo) , c!( baz) ] ) ) ;
255- assert ! ( e!( any( foo) ) . matches( & [ c!( bar) , c!( foo) , c!( baz) ] ) ) ;
256- assert ! ( e!( any( foo, bar) ) . matches( & [ c!( bar) ] ) ) ;
257- assert ! ( e!( any( foo, bar) ) . matches( & [ c!( foo) ] ) ) ;
258- assert ! ( e!( all( foo, bar) ) . matches( & [ c!( foo) , c!( bar) ] ) ) ;
259- assert ! ( e!( all( foo, bar) ) . matches( & [ c!( foo) , c!( bar) ] ) ) ;
260- assert ! ( e!( not( foo) ) . matches( & [ c!( bar) ] ) ) ;
261- assert ! ( e!( not( foo) ) . matches( & [ ] ) ) ;
262- assert ! ( e!( any( ( not( foo) ) , ( all( foo, bar) ) ) ) . matches( & [ c!( bar) ] ) ) ;
263- assert ! ( e!( any( ( not( foo) ) , ( all( foo, bar) ) ) ) . matches( & [ c!( foo) , c!( bar) ] ) ) ;
264- assert ! ( e!( foo) . matches( & [ c!( r # foo) ] ) ) ;
265- assert ! ( e!( r # foo) . matches( & [ c!( foo) ] ) ) ;
266- assert ! ( e!( r # foo) . matches( & [ c!( r # foo) ] ) ) ;
254+ let v87 = semver:: Version :: new ( 1 , 87 , 0 ) ;
255+ assert ! ( e!( foo) . matches( & [ c!( bar) , c!( foo) , c!( baz) ] , & v87) ) ;
256+ assert ! ( e!( any( foo) ) . matches( & [ c!( bar) , c!( foo) , c!( baz) ] , & v87) ) ;
257+ assert ! ( e!( any( foo, bar) ) . matches( & [ c!( bar) ] , & v87) ) ;
258+ assert ! ( e!( any( foo, bar) ) . matches( & [ c!( foo) ] , & v87) ) ;
259+ assert ! ( e!( all( foo, bar) ) . matches( & [ c!( foo) , c!( bar) ] , & v87) ) ;
260+ assert ! ( e!( all( foo, bar) ) . matches( & [ c!( foo) , c!( bar) ] , & v87) ) ;
261+ assert ! ( e!( not( foo) ) . matches( & [ c!( bar) ] , & v87) ) ;
262+ assert ! ( e!( not( foo) ) . matches( & [ ] , & v87) ) ;
263+ assert ! ( e!( any( ( not( foo) ) , ( all( foo, bar) ) ) ) . matches( & [ c!( bar) ] , & v87) ) ;
264+ assert ! ( e!( any( ( not( foo) ) , ( all( foo, bar) ) ) ) . matches( & [ c!( foo) , c!( bar) ] , & v87) ) ;
265+ assert ! ( e!( foo) . matches( & [ c!( r # foo) ] , & v87) ) ;
266+ assert ! ( e!( r # foo) . matches( & [ c!( foo) ] , & v87) ) ;
267+ assert ! ( e!( r # foo) . matches( & [ c!( r # foo) ] , & v87) ) ;
267268
268- assert ! ( !e!( foo) . matches( & [ ] ) ) ;
269- assert ! ( !e!( foo) . matches( & [ c!( bar) ] ) ) ;
270- assert ! ( !e!( foo) . matches( & [ c!( fo) ] ) ) ;
271- assert ! ( !e!( any( foo) ) . matches( & [ ] ) ) ;
272- assert ! ( !e!( any( foo) ) . matches( & [ c!( bar) ] ) ) ;
273- assert ! ( !e!( any( foo) ) . matches( & [ c!( bar) , c!( baz) ] ) ) ;
274- assert ! ( !e!( all( foo) ) . matches( & [ c!( bar) , c!( baz) ] ) ) ;
275- assert ! ( !e!( all( foo, bar) ) . matches( & [ c!( bar) ] ) ) ;
276- assert ! ( !e!( all( foo, bar) ) . matches( & [ c!( foo) ] ) ) ;
277- assert ! ( !e!( all( foo, bar) ) . matches( & [ ] ) ) ;
278- assert ! ( !e!( not( bar) ) . matches( & [ c!( bar) ] ) ) ;
279- assert ! ( !e!( not( bar) ) . matches( & [ c!( baz) , c!( bar) ] ) ) ;
280- assert ! ( !e!( any( ( not( foo) ) , ( all( foo, bar) ) ) ) . matches( & [ c!( foo) ] ) ) ;
269+ assert ! ( !e!( foo) . matches( & [ ] , & v87 ) ) ;
270+ assert ! ( !e!( foo) . matches( & [ c!( bar) ] , & v87 ) ) ;
271+ assert ! ( !e!( foo) . matches( & [ c!( fo) ] , & v87 ) ) ;
272+ assert ! ( !e!( any( foo) ) . matches( & [ ] , & v87 ) ) ;
273+ assert ! ( !e!( any( foo) ) . matches( & [ c!( bar) ] , & v87 ) ) ;
274+ assert ! ( !e!( any( foo) ) . matches( & [ c!( bar) , c!( baz) ] , & v87 ) ) ;
275+ assert ! ( !e!( all( foo) ) . matches( & [ c!( bar) , c!( baz) ] , & v87 ) ) ;
276+ assert ! ( !e!( all( foo, bar) ) . matches( & [ c!( bar) ] , & v87 ) ) ;
277+ assert ! ( !e!( all( foo, bar) ) . matches( & [ c!( foo) ] , & v87 ) ) ;
278+ assert ! ( !e!( all( foo, bar) ) . matches( & [ ] , & v87 ) ) ;
279+ assert ! ( !e!( not( bar) ) . matches( & [ c!( bar) ] , & v87 ) ) ;
280+ assert ! ( !e!( not( bar) ) . matches( & [ c!( baz) , c!( bar) ] , & v87 ) ) ;
281+ assert ! ( !e!( any( ( not( foo) ) , ( all( foo, bar) ) ) ) . matches( & [ c!( foo) ] , & v87 ) ) ;
281282}
282283
283284#[ test]
0 commit comments