Skip to content

Commit df33b83

Browse files
committed
[StdlibUnittest] add a TestRunPredicate for WASI
1 parent a9bd28d commit df33b83

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Diff for: stdlib/private/StdlibUnittest/StdlibUnittest.swift

+13
Original file line numberDiff line numberDiff line change
@@ -2444,6 +2444,8 @@ public enum TestRunPredicate : CustomStringConvertible {
24442444

24452445
case haikuAny(reason: String)
24462446

2447+
case wasiAny(reason: String)
2448+
24472449
case objCRuntime(/*reason:*/ String)
24482450
case nativeRuntime(/*reason:*/ String)
24492451

@@ -2565,6 +2567,9 @@ public enum TestRunPredicate : CustomStringConvertible {
25652567
case .haikuAny(reason: let reason):
25662568
return "haikuAny(*, reason: \(reason))"
25672569

2570+
case .wasiAny(reason: let reason):
2571+
return "wasiAny(*, reason: \(reason))"
2572+
25682573
case .objCRuntime(let reason):
25692574
return "Objective-C runtime, reason: \(reason))"
25702575
case .nativeRuntime(let reason):
@@ -2947,6 +2952,14 @@ public enum TestRunPredicate : CustomStringConvertible {
29472952
return false
29482953
}
29492954

2955+
case .wasiAny:
2956+
switch _getRunningOSVersion() {
2957+
case .wasi:
2958+
return true
2959+
default:
2960+
return false
2961+
}
2962+
29502963
case .objCRuntime:
29512964
#if _runtime(_ObjC)
29522965
return true

0 commit comments

Comments
 (0)