//
//  SplashTypographyTests.swift
//  suixinkanTests
//
//  Created by Codex on 2026/6/30.
//

import XCTest
@testable import suixinkan

/// 启动页字体规范测试，确保 Storyboard 与 SwiftUI 使用同一套字号与字重。
final class SplashTypographyTests: XCTestCase {
    /// 标题应使用 40pt system bold。
    func testTitleFontUsesExpectedPointSizeAndWeight() {
        let font = SplashTypography.titleUIFont
        XCTAssertEqual(font.pointSize, SplashTypography.titlePointSize, accuracy: 0.01)
        XCTAssertTrue(font.fontDescriptor.symbolicTraits.contains(.traitBold))
    }

    /// 副标题应使用 20pt system bold。
    func testSubtitleFontUsesExpectedPointSizeAndWeight() {
        let font = SplashTypography.subtitleUIFont
        XCTAssertEqual(font.pointSize, SplashTypography.subtitlePointSize, accuracy: 0.01)
        XCTAssertTrue(font.fontDescriptor.symbolicTraits.contains(.traitBold))
    }
}
