From 7d9839c2e2918d8e758727c47b76918df4b1483b Mon Sep 17 00:00:00 2001 From: Bassam Khouri Date: Tue, 24 Jun 2025 09:15:00 -0400 Subject: [PATCH] Tests: Disable test Test `roundTrippingUInt128` appears to be causing a stack dump in an OSS build on linux. Disable this test for now until we can properly get this resolved. rdar://154155359 --- .../JSONEncoderTests.swift | 35 ++++++++++++------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/Tests/FoundationEssentialsTests/JSONEncoderTests.swift b/Tests/FoundationEssentialsTests/JSONEncoderTests.swift index 6fc131ba6..ebc850c7f 100644 --- a/Tests/FoundationEssentialsTests/JSONEncoderTests.swift +++ b/Tests/FoundationEssentialsTests/JSONEncoderTests.swift @@ -35,6 +35,14 @@ import FoundationEssentials import Foundation #endif +var isLinux: Bool { + #if os(Linux) + true + #else + false + #endif +} + // MARK: - Test Suite @Suite("JSONEncoder") @@ -1433,18 +1441,21 @@ private struct JSONEncoderTests { } } } - - @Test(arguments: [ - UInt128.zero, - 1, - 0x0000_0000_0000_0000_7fff_ffff_ffff_ffff, - 0x0000_0000_0000_0000_8000_0000_0000_0000, - 0x0000_0000_0000_0000_ffff_ffff_ffff_ffff, - 0x0000_0000_0000_0001_0000_0000_0000_0000, - 0x7fff_ffff_ffff_ffff_ffff_ffff_ffff_ffff, - 0x8000_0000_0000_0000_0000_0000_0000_0000, - .max - ]) + + @Test( + .disabled(if: isLinux, "This test is not applicable on this platform"), + arguments: [ + UInt128.zero, + 1, + 0x0000_0000_0000_0000_7fff_ffff_ffff_ffff, + 0x0000_0000_0000_0000_8000_0000_0000_0000, + 0x0000_0000_0000_0000_ffff_ffff_ffff_ffff, + 0x0000_0000_0000_0001_0000_0000_0000_0000, + 0x7fff_ffff_ffff_ffff_ffff_ffff_ffff_ffff, + 0x8000_0000_0000_0000_0000_0000_0000_0000, + .max + ] + ) func roundTrippingUInt128(u128: UInt128) { _testRoundTrip(of: u128) }