mirror of
https://github.com/apple/swift-numerics
synced 2026-11-27 05:04:26 +00:00
Add Float16 tests for Approximate Equality.
This commit is contained in:
1 parent
13b74ae5f4
commit
4cd11553db
2 files changed
+14
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user