@@ -326,6 +326,7 @@ FloatingPoint.test("Float/Int16") {
326326 expectEqual(Int16.max, Int16(Float(Int16.max)))
327327}
328328
329+ #if !os(WASI)
329330FloatingPoint.test("Float/UInt32") {
330331 expectEqual(UInt32.min, UInt32(Float(UInt32.min)))
331332 expectCrashLater()
@@ -349,6 +350,7 @@ FloatingPoint.test("Float/Int64") {
349350 expectCrashLater()
350351 expectEqual(Int64.max, Int64(Float(Int64.max)))
351352}
353+ #endif
352354
353355FloatingPoint.test("Double/ExpressibleByIntegerLiteral") {
354356 expectEqual(positiveOne(), 1.0 as Double)
@@ -414,6 +416,7 @@ FloatingPoint.test("Double/Int32") {
414416 expectEqual(Int32.max, Int32(Double(Int32.max)))
415417}
416418
419+ #if !os(WASI)
417420FloatingPoint.test("Double/UInt64") {
418421 expectEqual(UInt64.min, UInt64(Double(UInt64.min)))
419422 expectCrashLater()
@@ -425,6 +428,7 @@ FloatingPoint.test("Double/Int64") {
425428 expectCrashLater()
426429 expectEqual(Int64.max, Int64(Double(Int64.max)))
427430}
431+ #endif
428432
429433FloatingPoint.test("Float/HashValueZero") {
430434 let zero: Float = getFloat32(0.0)
@@ -1170,11 +1174,14 @@ FloatingPoint.test("Float32/quietNaN") {
11701174 expectTrue(f.isNaN && !f.isSignalingNaN)
11711175 expectEqual(0x7fdf_ffff, f.bitPattern)
11721176 }
1177+
1178+ #if !os(WASI)
11731179 do {
11741180 // Payload overflow
11751181 expectCrashLater()
11761182 _ = Float32(nan: 0x20_0000, signaling: false)
11771183 }
1184+ #endif
11781185}
11791186
11801187FloatingPoint.test("Float64/quietNaN") {
@@ -1199,11 +1206,13 @@ FloatingPoint.test("Float64/quietNaN") {
11991206 expectTrue(f.isNaN && !f.isSignalingNaN)
12001207 expectEqual(0x7ffb_ffff_ffff_ffff, f.bitPattern)
12011208 }
1209+ #if !os(WASI)
12021210 do {
12031211 // Payload overflow
12041212 expectCrashLater()
12051213 _ = Float64(nan: 0x4_0000_0000_0000, signaling: false)
12061214 }
1215+ #endif
12071216}
12081217
12091218#if !os(Windows) && (arch(i386) || arch(x86_64))
@@ -1230,11 +1239,13 @@ FloatingPoint.test("Float80/quietNaN") {
12301239 expectTrue(f.isNaN && !f.isSignalingNaN)
12311240 expectEqual(Float80Bits(0x7fff, 0xdfff_ffff_ffff_ffff), f.bitPattern)
12321241 }
1242+ #if !os(WASI)
12331243 do {
12341244 // Payload overflow
12351245 expectCrashLater()
12361246 _ = Float80(nan: 0x2000_0000_0000_0000, signaling: false)
12371247 }
1248+ #endif
12381249}
12391250
12401251#endif
@@ -1263,11 +1274,13 @@ FloatingPoint.test("Float32/signalingNaN") {
12631274 expectTrue(f.isNaN && f.isSignalingNaN)
12641275 expectEqual(0x7fbf_ffff, f.bitPattern)
12651276 }
1277+ #if !os(WASI)
12661278 do {
12671279 // payload overflow
12681280 expectCrashLater()
12691281 _ = Float32(nan: 0x20_0000, signaling: true)
12701282 }
1283+ #endif
12711284}
12721285
12731286FloatingPoint.test("Float64/signalingNaN") {
@@ -1292,11 +1305,13 @@ FloatingPoint.test("Float64/signalingNaN") {
12921305 expectTrue(f.isNaN && f.isSignalingNaN)
12931306 expectEqual(0x7ff7_ffff_ffff_ffff, f.bitPattern)
12941307 }
1308+ #if !os(WASI)
12951309 do {
12961310 // payload overflow
12971311 expectCrashLater()
12981312 _ = Float64(nan: 0x4_0000_0000_0000, signaling: true)
12991313 }
1314+ #endif
13001315}
13011316
13021317#endif
@@ -1325,11 +1340,13 @@ FloatingPoint.test("Float80/signalingNaN") {
13251340 expectTrue(f.isNaN && f.isSignalingNaN)
13261341 expectEqual(Float80Bits(0x7fff, 0xbfff_ffff_ffff_ffff), f.bitPattern)
13271342 }
1343+ #if !os(WASI)
13281344 do {
13291345 // payload overflow
13301346 expectCrashLater()
13311347 _ = Float80(nan: 0x2000_0000_0000_0000, signaling: true)
13321348 }
1349+ #endif
13331350}
13341351
13351352#endif
0 commit comments