Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion Tests/WASITests/WASITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,37 @@ import Testing

@testable import WASI

enum TargetPlatform {
case android

func isCurrentPlatform() -> Bool {
switch self {
case .android:
#if os(Android)
return true
#else
return false
#endif
}
}
}

extension Trait where Self == ConditionTrait {
static func disabled(
_ comment: Comment? = nil,
sourceLocation: SourceLocation = #_sourceLocation,
platforms: [TargetPlatform]
) -> Self {
return .disabled(comment, sourceLocation: sourceLocation) {
platforms.contains { $0.isCurrentPlatform() }
}
}
}

@Suite
struct WASITests {
#if !os(Windows)
@Test
@Test(.disabled("XFAILED regression on Android with different error value thrown for `link-secret-dir-b/secret-c.txt`", platforms: [.android]))
func pathOpen() throws {
let t = try TestSupport.TemporaryDirectory()

Expand Down