From 54ff5161d4178f92a1701837b5827ac2f521e2da Mon Sep 17 00:00:00 2001 From: Butta Date: Mon, 5 Dec 2022 21:34:37 +0530 Subject: [PATCH] Add tweaks for Android --- Sources/TestSupport/TestSupport.swift | 2 +- Sources/VariadicsGenerator/VariadicsGenerator.swift | 2 +- Tests/RegexTests/UTS18Tests.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/TestSupport/TestSupport.swift b/Sources/TestSupport/TestSupport.swift index b60adb63f..b562f9255 100644 --- a/Sources/TestSupport/TestSupport.swift +++ b/Sources/TestSupport/TestSupport.swift @@ -15,7 +15,7 @@ import XCTest // *without* `-disable-availability-checking` to ensure the #available check is // not compiled into a no-op. -#if os(Linux) +#if os(Linux) || os(Android) public func XCTExpectFailure( _ message: String? = nil, body: () throws -> Void ) rethrows {} diff --git a/Sources/VariadicsGenerator/VariadicsGenerator.swift b/Sources/VariadicsGenerator/VariadicsGenerator.swift index 8ddaee145..ecfc31965 100644 --- a/Sources/VariadicsGenerator/VariadicsGenerator.swift +++ b/Sources/VariadicsGenerator/VariadicsGenerator.swift @@ -14,7 +14,7 @@ import ArgumentParser #if os(macOS) import Darwin -#elseif os(Linux) +#elseif canImport(Glibc) import Glibc #elseif os(Windows) import CRT diff --git a/Tests/RegexTests/UTS18Tests.swift b/Tests/RegexTests/UTS18Tests.swift index 11479bfb6..4cf68a153 100644 --- a/Tests/RegexTests/UTS18Tests.swift +++ b/Tests/RegexTests/UTS18Tests.swift @@ -62,7 +62,7 @@ fileprivate func expectFirstMatch( XCTAssertEqual(input.firstMatch(of: r)?.output, output, file: file, line: line) } -#if os(Linux) +#if os(Linux) || os(Android) func XCTExpectFailure(_ message: String? = nil, body: () throws -> Void) rethrows {} #endif