diff --git a/Tests/RealTests/ApproximateEqualityTests.swift b/Tests/RealTests/ApproximateEqualityTests.swift index d4d83fdb..9bbfc5a1 100644 --- a/Tests/RealTests/ApproximateEqualityTests.swift +++ b/Tests/RealTests/ApproximateEqualityTests.swift @@ -110,6 +110,15 @@ final class ElementaryFunctionTests: XCTestCase { } } + @available(iOS 14.0, watchOS 14.0, tvOS 7.0, *) + @available(macOS, unavailable) + @available(macCatalyst, unavailable) + func testFloat16() { + testSpecials(Float16.self) + testDefaults(Float16.self) + testRandom(Float16.self) + } + func testFloat() { testSpecials(Float.self) testDefaults(Float.self) diff --git a/Tests/RealTests/RealTestSupport.swift b/Tests/RealTests/RealTestSupport.swift index b61328d7..f43ab07a 100644 --- a/Tests/RealTests/RealTestSupport.swift +++ b/Tests/RealTests/RealTestSupport.swift @@ -86,6 +86,11 @@ internal protocol FixedWidthFloatingPoint: BinaryFloatingPoint where Exponent: FixedWidthInteger, RawSignificand: FixedWidthInteger { } +@available(iOS 14.0, watchOS 14.0, tvOS 7.0, *) +@available(macOS, unavailable) +@available(macCatalyst, unavailable) +extension Float16: FixedWidthFloatingPoint { } + extension Float: FixedWidthFloatingPoint { } extension Double: FixedWidthFloatingPoint { } #if (arch(i386) || arch(x86_64)) && !os(Windows) && !os(Android)