#if os(iOS) import XCTest @testable import CottonUI /// The tiles shrinking under a settled fan (sharing2 walk, 16 Oct 2026): a /// removed member's phone, sent back to Personal from its shared database's /// Notes, drew the page area at the old settled index over Home alone — the /// page's `tiles[index]` ran past the end and the app trapped. @MainActor final class FanShrinkTests: XCTestCase { private let fan = FanGeometry(scale: Theme.paper.scale) /// GUARD: a shrinking arrangement under a settled fan never subscripts out of range — what the page area draws is always a tile the fan holds now (the nearest card; Home when the open database left and Home alone stands), and nothing when there is no tile (coordinator, 16 Oct 2026: the removed member's phone died in `BoardSurface.fanHome`; a removed tool does the same). func testAShrinkingArrangementNeverDrawsPastItsTiles() { for was in 0..<12 { for count in 0...12 { for shows in [FanPageRule.Shows.live(was), .picture(was)] { guard let held = FanPageRule.held(shows, count: count) else { XCTAssertEqual(count, 0, "only a fan with no tile draws nothing") continue } switch held { case .live(let index), .picture(let index): XCTAssertTrue((0..