@@ -1420,6 +1420,7 @@ impl fmt::Display for CrateType {
14201420
14211421#[ cfg( test) ]
14221422mod tests {
1423+ use dep_graph:: DepGraph ;
14231424 use middle:: cstore:: DummyCrateStore ;
14241425 use session:: config:: { build_configuration, build_session_options} ;
14251426 use session:: build_session;
@@ -1439,14 +1440,15 @@ mod tests {
14391440 // When the user supplies --test we should implicitly supply --cfg test
14401441 #[ test]
14411442 fn test_switch_implies_cfg_test ( ) {
1443+ let dep_graph = DepGraph :: new ( false ) ;
14421444 let matches =
14431445 & match getopts ( & [ "--test" . to_string ( ) ] , & optgroups ( ) ) {
14441446 Ok ( m) => m,
14451447 Err ( f) => panic ! ( "test_switch_implies_cfg_test: {}" , f)
14461448 } ;
14471449 let registry = diagnostics:: registry:: Registry :: new ( & [ ] ) ;
14481450 let sessopts = build_session_options ( matches) ;
1449- let sess = build_session ( sessopts, None , registry, Rc :: new ( DummyCrateStore ) ) ;
1451+ let sess = build_session ( sessopts, & dep_graph , None , registry, Rc :: new ( DummyCrateStore ) ) ;
14501452 let cfg = build_configuration ( & sess) ;
14511453 assert ! ( ( attr:: contains_name( & cfg[ ..] , "test" ) ) ) ;
14521454 }
@@ -1455,6 +1457,7 @@ mod tests {
14551457 // another --cfg test
14561458 #[ test]
14571459 fn test_switch_implies_cfg_test_unless_cfg_test ( ) {
1460+ let dep_graph = DepGraph :: new ( false ) ;
14581461 let matches =
14591462 & match getopts ( & [ "--test" . to_string ( ) , "--cfg=test" . to_string ( ) ] ,
14601463 & optgroups ( ) ) {
@@ -1465,7 +1468,7 @@ mod tests {
14651468 } ;
14661469 let registry = diagnostics:: registry:: Registry :: new ( & [ ] ) ;
14671470 let sessopts = build_session_options ( matches) ;
1468- let sess = build_session ( sessopts, None , registry,
1471+ let sess = build_session ( sessopts, & dep_graph , None , registry,
14691472 Rc :: new ( DummyCrateStore ) ) ;
14701473 let cfg = build_configuration ( & sess) ;
14711474 let mut test_items = cfg. iter ( ) . filter ( |m| m. name ( ) == "test" ) ;
@@ -1475,13 +1478,14 @@ mod tests {
14751478
14761479 #[ test]
14771480 fn test_can_print_warnings ( ) {
1481+ let dep_graph = DepGraph :: new ( false ) ;
14781482 {
14791483 let matches = getopts ( & [
14801484 "-Awarnings" . to_string ( )
14811485 ] , & optgroups ( ) ) . unwrap ( ) ;
14821486 let registry = diagnostics:: registry:: Registry :: new ( & [ ] ) ;
14831487 let sessopts = build_session_options ( & matches) ;
1484- let sess = build_session ( sessopts, None , registry,
1488+ let sess = build_session ( sessopts, & dep_graph , None , registry,
14851489 Rc :: new ( DummyCrateStore ) ) ;
14861490 assert ! ( !sess. diagnostic( ) . can_emit_warnings) ;
14871491 }
@@ -1493,7 +1497,7 @@ mod tests {
14931497 ] , & optgroups ( ) ) . unwrap ( ) ;
14941498 let registry = diagnostics:: registry:: Registry :: new ( & [ ] ) ;
14951499 let sessopts = build_session_options ( & matches) ;
1496- let sess = build_session ( sessopts, None , registry,
1500+ let sess = build_session ( sessopts, & dep_graph , None , registry,
14971501 Rc :: new ( DummyCrateStore ) ) ;
14981502 assert ! ( sess. diagnostic( ) . can_emit_warnings) ;
14991503 }
@@ -1504,7 +1508,7 @@ mod tests {
15041508 ] , & optgroups ( ) ) . unwrap ( ) ;
15051509 let registry = diagnostics:: registry:: Registry :: new ( & [ ] ) ;
15061510 let sessopts = build_session_options ( & matches) ;
1507- let sess = build_session ( sessopts, None , registry,
1511+ let sess = build_session ( sessopts, & dep_graph , None , registry,
15081512 Rc :: new ( DummyCrateStore ) ) ;
15091513 assert ! ( sess. diagnostic( ) . can_emit_warnings) ;
15101514 }
0 commit comments