Two SPM packages (VNCCore, VNCUI) + thin iOS app target wired via xcodegen. Builds for iPhone 17 simulator, unit tests pass. - VNCCore: SessionState, SessionController stub, Transport protocol with DirectTransport (NWConnection), DiscoveryService (Bonjour on _rfb._tcp and _workstation._tcp), SavedConnection @Model, ConnectionStore, KeychainService, ClipboardBridge - VNCUI: ConnectionListView, AddConnectionView, SessionView, FramebufferView/FramebufferUIView (UIKit CALayer), InputMapper, SettingsView; UIKit bits guarded with #if canImport(UIKit) so swift test runs on macOS - App: @main VNCApp, AppStateController state machine, RootView - RoyalVNCKit dependency pinned to main (transitive CryptoSwift constraint blocks tagged releases) - xcodegen Project.yml + README + .gitignore Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
20 lines
585 B
Swift
20 lines
585 B
Swift
import Testing
|
|
@testable import VNCCore
|
|
import Foundation
|
|
|
|
@Suite struct SessionStateTests {
|
|
@Test func idleEqualsIdle() {
|
|
#expect(SessionState.idle == .idle)
|
|
}
|
|
|
|
@Test func connectedWithDifferentSizesDiffer() {
|
|
let a = SessionState.connected(framebufferSize: FramebufferSize(width: 1920, height: 1080))
|
|
let b = SessionState.connected(framebufferSize: FramebufferSize(width: 1280, height: 800))
|
|
#expect(a != b)
|
|
}
|
|
|
|
@Test func disconnectReasonsDiffer() {
|
|
#expect(DisconnectReason.userRequested != .authenticationFailed)
|
|
}
|
|
}
|