Zum Inhalt

apple/PhysarumApp/Tests/ControlIntentTests.swift

// `remoteMoveIntent` is gated to platforms that have SwiftUI's onMoveCommand
// (tvOS + macOS); iOS has no such source, so this mapping test follows the same
// guard. macOS remains the primary host for this test.
#if os(tvOS) || os(macOS)
import XCTest
import SwiftUI
@testable import Physarum

final class ControlIntentTests: XCTestCase {
    func testMoveMapping() {
        XCTAssertEqual(remoteMoveIntent(.left), .previous)
        XCTAssertEqual(remoteMoveIntent(.right), .next)
        XCTAssertEqual(remoteMoveIntent(.up), .showOverlay)
        XCTAssertEqual(remoteMoveIntent(.down), .dismissOverlay)
    }
}
#endif