diff --git a/Tests/TUIkitTests/FrameDiffWriterTests.swift b/Tests/TUIkitTests/FrameDiffWriterTests.swift index 3f25db46..df0172ec 100644 --- a/Tests/TUIkitTests/FrameDiffWriterTests.swift +++ b/Tests/TUIkitTests/FrameDiffWriterTests.swift @@ -191,8 +191,6 @@ struct DiffIntegrationTests { @Test("Content and status bar caches are independent") func independentCaches() { - let writer = FrameDiffWriter() - // Simulate writing content + status bar (using internal state check) let contentLines = ["Content1", "Content2"] let statusLines = ["Status1"] diff --git a/Tests/TUIkitTests/LifecycleManagerTests.swift b/Tests/TUIkitTests/LifecycleManagerTests.swift index ba0a9518..e6336ad3 100644 --- a/Tests/TUIkitTests/LifecycleManagerTests.swift +++ b/Tests/TUIkitTests/LifecycleManagerTests.swift @@ -218,12 +218,13 @@ struct LifecycleManagerTaskTests { nonisolated(unsafe) var wasCancelled = false manager.startTask(token: "task-1", priority: .medium) { // Long-running task that checks cancellation - try? await Task.sleep(for: .seconds(10)) + try? await Task.sleep(for: .milliseconds(100)) wasCancelled = Task.isCancelled } // Cancel immediately manager.cancelTask(token: "task-1") try await Task.sleep(for: .milliseconds(50)) + #expect(wasCancelled == true) // Task was cancelled, so it either didn't complete the sleep // or Task.isCancelled was true. Either way the task is cancelled. // We can't easily observe the internal state, but cancellation was requested. diff --git a/Tests/TUIkitTests/ProgressViewTests.swift b/Tests/TUIkitTests/ProgressViewTests.swift index f0714a00..a731c585 100644 --- a/Tests/TUIkitTests/ProgressViewTests.swift +++ b/Tests/TUIkitTests/ProgressViewTests.swift @@ -198,7 +198,7 @@ struct ProgressViewStyleTests { @Test("All styles render correct width") func allStylesCorrectWidth() { - let styles: [ProgressBarStyle] = [.block, .blockFine, .shade, .bar, .dot] + let styles: [TrackStyle] = [.block, .blockFine, .shade, .bar, .dot] let context = testContext(width: 20) for style in styles { diff --git a/Tests/TUIkitTests/RenderBottleneckTests.swift b/Tests/TUIkitTests/RenderBottleneckTests.swift index d9645d2c..3204391a 100644 --- a/Tests/TUIkitTests/RenderBottleneckTests.swift +++ b/Tests/TUIkitTests/RenderBottleneckTests.swift @@ -25,6 +25,7 @@ struct RenderBottleneckTests { /// Uses `Date` instead of `CFAbsoluteTimeGetCurrent` because CoreFoundation /// timing functions are not available on Linux. The precision difference /// is negligible for performance benchmarks at millisecond granularity. + @discardableResult private func measure(_ name: String, iterations: Int = 1000, block: () -> Void) -> TimeInterval { let start = Date() for _ in 0..