updates for lock screen, foxed graphs on front end

This commit is contained in:
Mark Gregory
2026-11-04 15:29:03 +00:00
parent b16c56baab
commit 280a459377
4 changed files with 17 additions and 3 deletions
+4
View File
@@ -249,6 +249,10 @@ final class MockProtocol: URLProtocol, @unchecked Sendable {
check(liveHistory.transferHistory.samples.count == 1, "Failed refresh never fabricates a speed sample")
liveHistory.disconnect()
check(liveHistory.transferHistory.samples.isEmpty, "Disconnect removes actual collected history")
var windowHistory = TransferHistory()
for second in [0, 3, 6] { windowHistory.record(download: 1, upload: 2, at: origin.addingTimeInterval(Double(second))) }
check(windowHistory.samples(from: origin.addingTimeInterval(3), through: origin.addingTimeInterval(6)).count == 2, "History window includes exact timestamp boundaries without new Date comparison entry points")
check(windowHistory.samples(from: origin.addingTimeInterval(7), through: origin.addingTimeInterval(9)).isEmpty, "History window excludes samples outside its numeric time range")
another.close(); transport.close(); print("\(checks) contract checks passed.")
}
}