diff --git a/Tests/OpenCombineTests/DispatchTests/DispatchQueueSchedulerTests.swift b/Tests/OpenCombineTests/DispatchTests/DispatchQueueSchedulerTests.swift index 8281a2c6..7dba43ed 100644 --- a/Tests/OpenCombineTests/DispatchTests/DispatchQueueSchedulerTests.swift +++ b/Tests/OpenCombineTests/DispatchTests/DispatchQueueSchedulerTests.swift @@ -186,11 +186,11 @@ final class DispatchQueueSchedulerTests: XCTestCase { makeStride = Stride.init(__guessFromUnknown:) #endif -#if arch(x86_64) || arch(arm64) || arch(s390x) || arch(powerpc64) || arch(powerpc64le) +#if arch(x86_64) || arch(arm64) || arch(powerpc64) || arch(powerpc64le) || arch(s390x) || arch(riscv64) // 64-bit platforms let minNanoseconds = -0x13B13B13B13B13B0 // Int64.min / 6.5 let maxNanoseconds = 0x2C4EC4EC4EC4EC4D // Int64.max / 2.889 -#elseif arch(i386) || arch(arm) +#elseif arch(i386) || arch(arm) || arch(arm64_32) || arch(wasm32) || arch(powerpc) // 32-bit platforms let minNanoseconds = Int.min + 1 let maxNanoseconds = Int.max @@ -262,13 +262,13 @@ final class DispatchQueueSchedulerTests: XCTestCase { XCTAssertEqual(Stride.microseconds(2).magnitude, 2_000) XCTAssertEqual(Stride.nanoseconds(2).magnitude, 2) -#if arch(x86_64) || arch(arm64) || arch(s390x) || arch(powerpc64) || arch(powerpc64le) +#if arch(x86_64) || arch(arm64) || arch(powerpc64) || arch(powerpc64le) || arch(s390x) || arch(riscv64) // 64-bit platforms XCTAssertEqual( Stride.seconds(Double(Int.max) / 1_000_000_000 - 1).magnitude, 9223372035854776320 ) -#elseif arch(i386) || arch(arm) +#elseif arch(i386) || arch(arm) || arch(arm64_32) || arch(wasm32) || arch(powerpc) // 32-bit platforms XCTAssertEqual( Stride.seconds(Double(Int.max) / 1_000_000_000).magnitude, @@ -291,13 +291,13 @@ final class DispatchQueueSchedulerTests: XCTestCase { } func testStrideFromTooMuchSeconds() { -#if arch(x86_64) || arch(arm64) || arch(s390x) || arch(powerpc64) || arch(powerpc64le) +#if arch(x86_64) || arch(arm64) || arch(powerpc64) || arch(powerpc64le) || arch(s390x) || arch(riscv64) // 64-bit platforms XCTAssertEqual( Stride.seconds(Double(Int.max) / 1_000_000_000).magnitude, .max ) -#elseif arch(i386) || arch(arm) +#elseif arch(i386) || arch(arm) || arch(arm64_32) || arch(wasm32) || arch(powerpc) // 32-bit platforms XCTAssertEqual( Stride.seconds(Double(Int.max) / 1_000_000_000).magnitude, diff --git a/Tests/OpenCombineTests/FoundationTests/RunLoopSchedulerTests.swift b/Tests/OpenCombineTests/FoundationTests/RunLoopSchedulerTests.swift index 24b35e98..9e9c4a37 100644 --- a/Tests/OpenCombineTests/FoundationTests/RunLoopSchedulerTests.swift +++ b/Tests/OpenCombineTests/FoundationTests/RunLoopSchedulerTests.swift @@ -79,14 +79,14 @@ final class RunLoopSchedulerTests: XCTestCase { XCTAssertEqual(time.advanced(by: stride2), .init(Date(timeIntervalSinceReferenceDate: 9780))) -#if arch(x86_64) || arch(arm64) || arch(s390x) || arch(powerpc64) || arch(powerpc64le) +#if arch(x86_64) || arch(arm64) || arch(powerpc64) || arch(powerpc64le) || arch(s390x) || arch(riscv64) // 64-bit platforms XCTAssertEqual(time.advanced(by: .nanoseconds(.max)).date, Date(timeIntervalSinceReferenceDate: 9223382036.854776)) XCTAssertEqual(time.advanced(by: .seconds(.max)).date, Date(timeIntervalSinceReferenceDate: 9.223372036854786E+18)) -#elseif arch(i386) || arch(arm) +#elseif arch(i386) || arch(arm) || arch(arm64_32) || arch(wasm32) || arch(powerpc) // 32-bit platforms XCTAssertEqual(time.advanced(by: .nanoseconds(.max)).date, Date(timeIntervalSinceReferenceDate: 10002.147483647)) @@ -166,13 +166,13 @@ final class RunLoopSchedulerTests: XCTestCase { XCTAssertEqual(Stride.milliseconds(2).timeInterval, 0.002) XCTAssertEqual(Stride.microseconds(2).timeInterval, 2E-06) XCTAssertEqual(Stride.nanoseconds(2).timeInterval, 2E-09) -#if arch(x86_64) || arch(arm64) || arch(s390x) || arch(powerpc64) || arch(powerpc64le) +#if arch(x86_64) || arch(arm64) || arch(powerpc64) || arch(powerpc64le) || arch(s390x) || arch(riscv64) // 64-bit platforms XCTAssertEqual(Stride.seconds(Int.max).timeInterval, 9.223372036854776E+18) XCTAssertEqual(Stride.milliseconds(.max).timeInterval, 9.223372036854776E+15) XCTAssertEqual(Stride.microseconds(.max).timeInterval, 9223372036854.775) XCTAssertEqual(Stride.nanoseconds(.max).timeInterval, 9223372036.854776) -#elseif arch(i386) || arch(arm) +#elseif arch(i386) || arch(arm) || arch(arm64_32) || arch(wasm32) || arch(powerpc) // 32-bit platforms XCTAssertEqual(Stride.seconds(Int.max).timeInterval, 2147483647) XCTAssertEqual(Stride.milliseconds(.max).timeInterval, 2147483.647)