diff --git a/Tests/ThemeParkTests/BBEditThemeTests.swift b/Tests/ThemeParkTests/BBEditThemeTests.swift index c9bbfc2..b51552a 100644 --- a/Tests/ThemeParkTests/BBEditThemeTests.swift +++ b/Tests/ThemeParkTests/BBEditThemeTests.swift @@ -19,7 +19,7 @@ final class BBEditThemeTests: XCTestCase { PlatformColor(red: 0.077525, green: 0.077522, blue: 0.077524, alpha: 1.000000).toHex() ) XCTAssertEqual( - theme.style(for: Query(key: .syntax(.text), context: .init(colorScheme: .light))).color.toHex(), + theme.style(for: Query(key: .syntax(.text(nil)), context: .init(colorScheme: .light))).color.toHex(), PlatformColor(hue: 0.0, saturation: 0.0, brightness: 0.68, alpha: 1.0).toHex() ) } diff --git a/Tests/ThemeParkTests/CodableStylerTests.swift b/Tests/ThemeParkTests/CodableStylerTests.swift index 7744774..68e9cfe 100644 --- a/Tests/ThemeParkTests/CodableStylerTests.swift +++ b/Tests/ThemeParkTests/CodableStylerTests.swift @@ -28,8 +28,8 @@ final class CodableStylerTests: XCTestCase { ) XCTAssertEqual( - mock.style(for: .syntax(.text), context: context), - theme.style(for: .syntax(.text), context: context) + mock.style(for: .syntax(.text(nil)), context: context), + theme.style(for: .syntax(.text(nil)), context: context) ) } @@ -44,8 +44,8 @@ final class CodableStylerTests: XCTestCase { ) XCTAssertEqual( - mock.style(for: .syntax(.text), context: context), - theme.style(for: .syntax(.text), context: context) + mock.style(for: .syntax(.text(nil)), context: context), + theme.style(for: .syntax(.text(nil)), context: context) ) } @@ -64,8 +64,8 @@ final class CodableStylerTests: XCTestCase { ) XCTAssertEqual( - mock.style(for: .syntax(.text), context: context), - decodedTheme.style(for: .syntax(.text), context: context) + mock.style(for: .syntax(.text(nil)), context: context), + decodedTheme.style(for: .syntax(.text(nil)), context: context) ) } } diff --git a/Tests/ThemeParkTests/TextMateThemeTests.swift b/Tests/ThemeParkTests/TextMateThemeTests.swift index 4086fe7..218c675 100644 --- a/Tests/ThemeParkTests/TextMateThemeTests.swift +++ b/Tests/ThemeParkTests/TextMateThemeTests.swift @@ -27,7 +27,7 @@ final class TextMateThemeTests: XCTestCase { Style(color: PlatformColor(hex: "#0C1021")!) ) XCTAssertEqual( - theme.style(for: Query(key: .syntax(.text), context: .init(colorScheme: .light))), + theme.style(for: Query(key: .syntax(.text(nil)), context: .init(colorScheme: .light))), Style(color: PlatformColor(hex: "#F8F8F8")!) ) XCTAssertEqual( diff --git a/Tests/ThemeParkTests/XcodeThemeTests.swift b/Tests/ThemeParkTests/XcodeThemeTests.swift index 99776e9..dbe20ff 100644 --- a/Tests/ThemeParkTests/XcodeThemeTests.swift +++ b/Tests/ThemeParkTests/XcodeThemeTests.swift @@ -17,19 +17,14 @@ final class XcodeThemeTests: XCTestCase { func testSemanticQueries() throws { let url = try XCTUnwrap(Bundle.module.url(forResource: "Default (Light)", withExtension: "xccolortheme", subdirectory: "Resources")) let theme = try XcodeTheme(contentsOf: url) -#if os(macOS) - let fallbackFont = PlatformFont.systemFont(ofSize: 10.0) -#else - let fallbackFont = PlatformFont.preferredFont(forTextStyle: .body) -#endif // color equality here is actually quite tricky XCTAssertEqual( theme.style(for: .editor(.background)), - Style(color: PlatformColor(hex: "#ffffff")!, font: fallbackFont) + Style(color: PlatformColor(hex: "#ffffff")!) ) XCTAssertEqual( - theme.style(for: .syntax(.text)).color.toHex(), + theme.style(for: .syntax(.text(nil))).color.toHex(), PlatformColor(red: 0.0, green: 0.0, blue: 0.0, alpha: 0.85).toHex() ) XCTAssertEqual( @@ -42,7 +37,7 @@ final class XcodeThemeTests: XCTestCase { ) XCTAssertEqual( theme.style(for: .gutter(.label)), - theme.style(for: .syntax(.text)) + theme.style(for: .syntax(.text(nil))) ) } }