Cotton code
30 lines · 1021 B · SwiftRaw
// A list split by its `by_day` column (`daySections`) keeps every record it// was handed: newest day first, the order read within a day, and a record// with no day last, never dropped. Read over the kit's email threads, whose// list is split by `last_at`.//// Every record is synthetic and no case reads a wall clock — `now` is fixed.import CottonKitimport CottonValuesimport XCTest@testable import CottonUI@MainActorfinal class ActivityNoLossTests: XCTestCase {    /// 2026-09-10, 12:00 UTC.    private let now = Date(timeIntervalSince1970: 1_789_041_600)    private static var resources: Bundle? {        Bundle(url: SourceSweep.iosSources.appendingPathComponent("CottonUI/Resources"))    }    private func definition(_ id: String) throws -> TableDefinition {        let loaded = FixtureDefinitions.load(from: try XCTUnwrap(Self.resources))        XCTAssertEqual(loaded.failures, [])        return try XCTUnwrap(loaded.definitions.first { $0.id == id }, "\(id) has no definition")    }}