Summary
MacOSOptimizationManager and MacOSPerformanceStrategy in Framework/Sources/Platform/macOS/Views/Extensions/PlatformMacOSOptimizationsLayer5.swift have no executing tests. Spawned from #402: the orphan LayeredTestingSuite L5 file was removed rather than wired; its manager tests never ran and would have locked placeholder constants (strategy == .standard, isMacOSOptimized == false) without proving anything on a green lane.
Current production (macOS-only)
MacOSPerformanceStrategy: String, CaseIterable (standard, optimized, highPerformance, maximumPerformance).
MacOSOptimizationManager.shared (@MainActor).
getCurrentPerformanceStrategy() — internal, always returns .standard (comment: placeholder).
applyMacOSOptimizations() — internal no-op.
isMacOSOptimized — public, always false (TODO).
macOSVersion — public, ProcessInfo.processInfo.operatingSystemVersionString.
Desired tests
Add tests in SixLayerFrameworkUnitTests (macOS unit lane; wrap in #if os(macOS)). Strict TDD (strict-tdd-definition): invert new observations, runtime red, then green. No .serialized.
Lock observable current contracts, not the TODOs as if they were implemented:
MacOSPerformanceStrategy.allCases is complete and raw values are non-empty / unique.
shared is a stable singleton (===).
macOSVersion is non-empty and matches ProcessInfo on the test host.
- If testing the internal placeholders via
@testable: document that .standard / false are current stub behavior, so a real implementation is a deliberate test change — or skip those until the API is designed.
Do not host views. Do not reintroduce LayeredTestingSuite.
Out of scope
- Implementing the TODO optimizations (window/menu/a11y). That is a product issue, not this test gap.
- iOS L5 haptic coverage — separate issue.
References
Summary
MacOSOptimizationManagerandMacOSPerformanceStrategyinFramework/Sources/Platform/macOS/Views/Extensions/PlatformMacOSOptimizationsLayer5.swifthave no executing tests. Spawned from #402: the orphanLayeredTestingSuiteL5 file was removed rather than wired; its manager tests never ran and would have locked placeholder constants (strategy == .standard,isMacOSOptimized == false) without proving anything on a green lane.Current production (macOS-only)
MacOSPerformanceStrategy:String,CaseIterable(standard,optimized,highPerformance,maximumPerformance).MacOSOptimizationManager.shared(@MainActor).getCurrentPerformanceStrategy()— internal, always returns.standard(comment: placeholder).applyMacOSOptimizations()— internal no-op.isMacOSOptimized— public, alwaysfalse(TODO).macOSVersion— public,ProcessInfo.processInfo.operatingSystemVersionString.Desired tests
Add tests in
SixLayerFrameworkUnitTests(macOS unit lane; wrap in#if os(macOS)). Strict TDD (strict-tdd-definition): invert new observations, runtime red, then green. No.serialized.Lock observable current contracts, not the TODOs as if they were implemented:
MacOSPerformanceStrategy.allCasesis complete and raw values are non-empty / unique.sharedis a stable singleton (===).macOSVersionis non-empty and matchesProcessInfoon the test host.@testable: document that.standard/falseare current stub behavior, so a real implementation is a deliberate test change — or skip those until the API is designed.Do not host views. Do not reintroduce
LayeredTestingSuite.Out of scope
References
PlatformMacOSOptimizationsLayer5.swift