From 76659ab6fc3f9c7af7c5b0507c5daf6806992558 Mon Sep 17 00:00:00 2001 From: kudit Date: Sun, 23 Aug 2026 00:04:37 -0400 Subject: [PATCH 1/2] Adopt Compatibility Swift Testing bridge --- .../ParticleEffectsTests.swift | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Development/ParticleEffectsTests/ParticleEffectsTests.swift b/Development/ParticleEffectsTests/ParticleEffectsTests.swift index 9e88174..662f451 100644 --- a/Development/ParticleEffectsTests/ParticleEffectsTests.swift +++ b/Development/ParticleEffectsTests/ParticleEffectsTests.swift @@ -8,33 +8,28 @@ // Swift Testing requires Swift 5.9 or newer. These guards also keep alternate toolchains from trying to // compile an unavailable test framework or module while the manifest's separate guard protects Playgrounds. #if compiler(>=5.9) && canImport(ParticleEffects) && canImport(Testing) -import Compatibility +import CompatibilityTesting import ParticleEffects import Testing -/// Bridges ParticleEffects' ordered reusable tests into Swift Testing. +/// Presents every reusable ParticleEffects `TestCase` as its own named Swift Testing argument. /// /// Animation timing and SwiftUI layout remain excluded because wall-clock and view-hosting checks would be /// fragile across the package's supported platforms. The deterministic checks live on ``ParticleEffects/tests``. @Suite("ParticleEffects Tests") struct ParticleEffectsTests { - /// Runs one shared test while retaining its section name in Swift Testing's argument report. + /// Runs the same ordered reusable tests used by Compatibility's in-app test UI. @Test( "Reusable ParticleEffects test", .serialized, arguments: await MainActor.run { - ParticleEffects.tests.flatMap { section, tests in - tests.map { (section: section, test: $0) } - } + ModuleTestEntry.entries(for: ParticleEffects.self, tests: ParticleEffects.tests) } ) @MainActor @available(iOS 13, macOS 12, tvOS 13, watchOS 6, *) - func reusableParticleEffectsTest(section: String, test: TestCase) async throws { - // The section is intentionally retained as an argument so failures are grouped in deterministic context. - _ = section - // Execute the shared closure directly so thrown failures remain native Swift Testing failures. - try await test.execute() + func reusableParticleEffectsTest(_ entry: ModuleTestEntry) async throws { + try await entry.execute() } } #endif From 198406e3d504cbc06c102660e5d49b43bd2bc823 Mon Sep 17 00:00:00 2001 From: kudit Date: Sun, 23 Aug 2026 00:04:51 -0400 Subject: [PATCH 2/2] Require Compatibility 1.19 testing support --- Package.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 3b28e73..39946c6 100644 --- a/Package.swift +++ b/Package.swift @@ -129,6 +129,7 @@ targets += [ name: "\(packageLibraryName)Tests", dependencies: [ .init(stringLiteral: packageLibraryName), // Preserve the computed target name used throughout this manifest. + .product(name: "Compatibility Testing Library", package: "compatibility"), ], path: "Development/ParticleEffectsTests" ), @@ -142,7 +143,7 @@ let package = Package( // include dependencies dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/kudit/Compatibility.git", from: "1.18.2"), + .package(url: "https://github.com/kudit/Compatibility.git", from: "1.19.0"), ], targets: targets )