File tree Expand file tree Collapse file tree 1 file changed +16
-16
lines changed Expand file tree Collapse file tree 1 file changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -1230,23 +1230,23 @@ struct ComparisonTest {
12301230 }
12311231
12321232 init (
1233- _ lhs: String , _ rhs: String ,
1234- expectedFailure reason : String = " " , line : UInt = #line
1235- ) {
1236- self . lhs = lhs
1237- self . rhs = rhs
1238- self . behavior = reason . isEmpty ? . run : . expectedFailure ( reason )
1239- self . loc = line
1240- }
1233+ _ lhs: String , _ rhs: String ,
1234+ expectedFailure xfailReason : String = " " ,
1235+ skip skipReason : String = " " ,
1236+ line : UInt = #line
1237+ ) {
1238+ self . lhs = lhs
1239+ self . rhs = rhs
1240+ self . loc = line
12411241
1242- init (
1243- _ lhs : String , _ rhs : String ,
1244- skip reason : String = " " , line : UInt = #line
1245- ) {
1246- self . lhs = lhs
1247- self . rhs = rhs
1248- self . behavior = reason . isEmpty ? . run : . skip ( reason )
1249- self . loc = line
1242+ switch ( xfailReason . isEmpty , skipReason . isEmpty ) {
1243+ case ( false , true ) :
1244+ behavior = . expectedFailure ( xfailReason )
1245+ case ( _ , false ) :
1246+ behavior = . skip ( skipReason )
1247+ default :
1248+ behavior = . run
1249+ }
12501250 }
12511251}
12521252
You can’t perform that action at this time.
0 commit comments