File tree 1 file changed +12
-0
lines changed
src/tools/compiletest/src
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -298,6 +298,12 @@ impl<'test> TestCx<'test> {
298
298
/// Code executed for each revision in turn (or, if there are no
299
299
/// revisions, exactly once, with revision == None).
300
300
fn run_revision ( & self ) {
301
+ if self . props . should_ice {
302
+ if self . config . mode != CompileFail &&
303
+ self . config . mode != Incremental {
304
+ self . fatal ( "cannot use should-ice in a test that is not cfail" ) ;
305
+ }
306
+ }
301
307
match self . config . mode {
302
308
CompileFail => self . run_cfail_test ( ) ,
303
309
RunFail => self . run_rfail_test ( ) ,
@@ -2782,8 +2788,14 @@ impl<'test> TestCx<'test> {
2782
2788
}
2783
2789
2784
2790
if revision. starts_with ( "rpass" ) {
2791
+ if revision_cx. props . should_ice {
2792
+ revision_cx. fatal ( "can only use should-ice in cfail tests" ) ;
2793
+ }
2785
2794
revision_cx. run_rpass_test ( ) ;
2786
2795
} else if revision. starts_with ( "rfail" ) {
2796
+ if revision_cx. props . should_ice {
2797
+ revision_cx. fatal ( "can only use should-ice in cfail tests" ) ;
2798
+ }
2787
2799
revision_cx. run_rfail_test ( ) ;
2788
2800
} else if revision. starts_with ( "cfail" ) {
2789
2801
revision_cx. run_cfail_test ( ) ;
You can’t perform that action at this time.
0 commit comments