Skip to content

Commit bb20a87

Browse files
authored
Merge pull request #29871 from swiftwasm/swiftwasm-stdlib-tests
2 parents 7063a79 + 88ad780 commit bb20a87

8 files changed

+9
-9
lines changed

test/stdlib/FloatConstants.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
44
import Darwin
5-
#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku)
5+
#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) || os(WASI)
66
import Glibc
77
#elseif os(Windows)
88
import MSVCRT

test/stdlib/MathConstants.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
44
import Darwin
5-
#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku)
5+
#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) || os(WASI)
66
import Glibc
77
#elseif os(Windows)
88
import MSVCRT

test/stdlib/POSIX.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import StdlibUnittest
66
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
77
import Darwin
8-
#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku)
8+
#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) || os(WASI)
99
import Glibc
1010
#else
1111
#error("Unsupported platform")

test/stdlib/PrintPointer.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ PrintTests.test("Printable") {
99
let lowUP = UnsafeMutablePointer<Float>(bitPattern: 0x1)!
1010
let fourByteUP = UnsafeMutablePointer<Float>(bitPattern: 0xabcd1234 as UInt)!
1111

12-
#if !(arch(i386) || arch(arm))
12+
#if !(arch(i386) || arch(arm) || arch(wasm32))
1313
let eightByteAddr: UInt = 0xabcddcba12344321
1414
let eightByteUP = UnsafeMutablePointer<Float>(bitPattern: eightByteAddr)!
1515
#endif
1616

17-
#if arch(i386) || arch(arm)
17+
#if arch(i386) || arch(arm) || arch(wasm32)
1818
let expectedLow = "0x00000001"
1919
expectPrinted("0xabcd1234", fourByteUP)
2020
#else

test/stdlib/Runtime.swift.gyb

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import SwiftShims
1212

1313
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
1414
import Darwin
15-
#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku)
15+
#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) || os(WASI)
1616
import Glibc
1717
#elseif os(Windows)
1818
import MSVCRT

test/stdlib/VarArgs.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Swift
66
#if _runtime(_ObjC)
77
import Darwin
88
import CoreGraphics
9-
#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku)
9+
#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) || os(WASI)
1010
import Glibc
1111
typealias CGFloat = Double
1212
#elseif os(Windows)

test/stdlib/tgmath.swift.gyb

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
2121
import Darwin.C.tgmath
22-
#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku)
22+
#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) || os(WASI)
2323
import Glibc
2424
#elseif os(Windows)
2525
import MSVCRT

test/stdlib/tgmath_optimized.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
88
import Darwin
9-
#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku)
9+
#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) || os(WASI)
1010
import Glibc
1111
#elseif os(Windows)
1212
import MSVCRT

0 commit comments

Comments
 (0)