updates for lock screen, foxed graphs on front end
This commit is contained in:
@@ -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.")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user