krz/daybyday

iOS learning games for young children: days, months, seasons, numbers, letters, animals and more. education ios kids swift https://krz.sh/apps/daybyday/

DayByDayTests/HeadingFontTests.swift

062549ad26607ce9e973ed2a9a7ef6f853885f83
daybyday/DayByDayTests/HeadingFontTests.swift history · blame · raw

21 lines · 689 bytes

3 symbols in this file
 1import SwiftUI
 2import Testing
 3import UIKit
 4@testable import DayByDay
 5
 6@MainActor
 7struct HeadingFontTests {
 8    @Test func balooIsBundledAndRegistered() {
 9        HeadingFont.register()
10        #expect(UIFont(name: HeadingFont.bold, size: 20) != nil)
11        #expect(UIFont(name: HeadingFont.extraBold, size: 20) != nil)
12    }
13
14    @Test func headingsScaleLikeTheNearestTextStyle() {
15        #expect(HeadingFont.textStyle(for: 11) == .caption2)
16        #expect(HeadingFont.textStyle(for: 17) == .body)
17        #expect(HeadingFont.textStyle(for: 22) == .title2)
18        #expect(HeadingFont.textStyle(for: 28) == .title)
19        #expect(HeadingFont.textStyle(for: 96) == .largeTitle)
20    }
21}