Skip to content

Commit f70bf24

Browse files
committed
Platform check for TestFoundation failures for Apple Swift 5 Toolchain on PowerPC64LE(SR-10255)
Platform check for TestFoundation failures for Apple Swift 5 Toolchain on PowerPC64LE(SR-10255)
1 parent cae5eac commit f70bf24

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

TestFoundation/TestNSNumber.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,11 @@ class TestNSNumber : XCTestCase {
865865
XCTAssertEqual(nanFloat.int32Value, 0)
866866
XCTAssertEqual(nanFloat.uint32Value, 0)
867867
XCTAssertEqual(nanFloat.int64Value, Int64(bitPattern: 1 << 63))
868+
#if arch(powerpc64le)
869+
XCTAssertEqual(nanFloat.uint64Value, UInt64(bitPattern: 1 << 63 | 1 << 31))
870+
#else
868871
XCTAssertEqual(nanFloat.uint64Value, UInt64(bitPattern: 1 << 63))
872+
#endif
869873
}
870874

871875
func test_numberWithDouble() {
@@ -910,8 +914,11 @@ class TestNSNumber : XCTestCase {
910914
XCTAssertEqual(nanDouble.int32Value, 0)
911915
XCTAssertEqual(nanDouble.uint32Value, 0)
912916
XCTAssertEqual(nanDouble.int64Value, Int64(bitPattern: 1 << 63))
917+
#if arch(powerpc64le)
918+
XCTAssertEqual(nanDouble.uint64Value, UInt64(bitPattern: 1 << 63 | 1 << 31))
919+
#else
913920
XCTAssertEqual(nanDouble.uint64Value, UInt64(bitPattern: 1 << 63))
914-
921+
#endif
915922
}
916923

917924
func test_compareNumberWithBool() {

0 commit comments

Comments
 (0)