Skip to content

Commit 37032d8

Browse files
committed
test: guard Float80 on Windows
Windows does not support fp80 even on x86. Adjust the test conditions accordingly.
1 parent 7732b98 commit 37032d8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/stdlib/FloatingPoint.swift.gyb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Swift
99
import StdlibUnittest
1010

11-
#if arch(i386) || arch(x86_64)
11+
#if !os(Windows) && (arch(i386) || arch(x86_64))
1212

1313
struct Float80Bits : Equatable, CustomStringConvertible {
1414
var signAndExponent: UInt16
@@ -58,7 +58,7 @@ extension Float80 {
5858
% ('Float80', 'Float80Bits')
5959
% ]:
6060
% if FloatTy == 'Float80':
61-
#if arch(i386) || arch(x86_64)
61+
#if !os(Windows) && (arch(i386) || arch(x86_64))
6262
% end
6363
func expectBitwiseEqual(
6464
_ expected: ${FloatTy}, _ actual: ${FloatTy},
@@ -605,7 +605,7 @@ FloatingPoint.test("${Self}.nextUp, .nextDown/nan") {
605605
}
606606
%end
607607

608-
#if arch(i386) || arch(x86_64)
608+
#if !os(Windows) && (arch(i386) || arch(x86_64))
609609

610610
FloatingPoint.test("Float80/ExpressibleByIntegerLiteral") {
611611
expectEqual(positiveOne(), 1.0 as Float80)
@@ -825,7 +825,7 @@ FloatingPoint.test("${FloatSelf}/{Comparable,Hashable,Equatable}") {
825825
% end
826826

827827
% for Self in ['Float32', 'Float64', 'Float80']:
828-
#if ${'arch(i386) || arch(x86_64)' if Self == 'Float80' else 'true'}
828+
#if ${'!os(Windows) && (arch(i386) || arch(x86_64))' if Self == 'Float80' else 'true'}
829829
FloatingPoint.test("${Self}/Strideable") {
830830
// FIXME: the test data could probably be better chosen here, to
831831
// exercise more cases. Note: NaNs (and possibly Infs) are singular
@@ -1018,7 +1018,7 @@ FloatingPoint.test("Float64/Literals") {
10181018
}
10191019
}
10201020

1021-
#if arch(i386) || arch(x86_64)
1021+
#if !os(Windows) && (arch(i386) || arch(x86_64))
10221022

10231023
FloatingPoint.test("Float80/Literals") {
10241024
do {
@@ -1156,7 +1156,7 @@ FloatingPoint.test("Float64/quietNaN") {
11561156
}
11571157
}
11581158

1159-
#if arch(i386) || arch(x86_64)
1159+
#if !os(Windows) && (arch(i386) || arch(x86_64))
11601160

11611161
FloatingPoint.test("Float80/quietNaN") {
11621162
do {
@@ -1251,7 +1251,7 @@ FloatingPoint.test("Float64/signalingNaN") {
12511251

12521252
#endif
12531253

1254-
#if arch(x86_64)
1254+
#if !os(Windows) && arch(x86_64)
12551255

12561256
FloatingPoint.test("Float80/signalingNaN") {
12571257
do {

0 commit comments

Comments
 (0)