Skip to content

Commit ae799d0

Browse files
authored
Add support for Mac Catalyst (#287)
1 parent 5be879a commit ae799d0

File tree

7 files changed

+27
-1
lines changed

7 files changed

+27
-1
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ test-macos:
33
-scheme MarkdownUI \
44
-destination platform="macOS"
55

6+
test-macos-maccatalyst:
7+
xcodebuild test \
8+
-scheme MarkdownUI \
9+
-destination platform="macOS,variant=Mac Catalyst"
10+
611
test-ios:
712
xcodebuild test \
813
-scheme MarkdownUI \
@@ -18,7 +23,7 @@ test-watchos:
1823
-scheme MarkdownUI \
1924
-destination platform="watchOS Simulator,name=Apple Watch SE (40mm) (2nd generation)"
2025

21-
test: test-macos test-ios test-tvos test-watchos
26+
test: test-macos test-macos-maccatalyst test-ios test-tvos test-watchos
2227

2328
format:
2429
swift format --in-place --recursive .

Package.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ let package = Package(
88
.macOS(.v12),
99
.iOS(.v15),
1010
.tvOS(.v15),
11+
.macCatalyst(.v15),
1112
.watchOS(.v8),
1213
],
1314
products: [

Tests/MarkdownUITests/MarkdownImageTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
final class MarkdownImageTests: XCTestCase {
99
private let layout = SwiftUISnapshotLayout.device(config: .iPhone8)
1010

11+
override func setUpWithError() throws {
12+
try XCTSkipIf(UIDevice.current.userInterfaceIdiom == .pad, "Skipping on Mac Catalyst")
13+
}
14+
1115
func testFailingImage() {
1216
let view = Markdown {
1317
#"""

Tests/MarkdownUITests/MarkdownListTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
final class MarkdownListTests: XCTestCase {
99
private let layout = SwiftUISnapshotLayout.device(config: .iPhone8)
1010

11+
override func setUpWithError() throws {
12+
try XCTSkipIf(UIDevice.current.userInterfaceIdiom == .pad, "Skipping on Mac Catalyst")
13+
}
14+
1115
func testTaskList() {
1216
let view = Markdown {
1317
#"""

Tests/MarkdownUITests/MarkdownTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
final class MarkdownTests: XCTestCase {
99
private let layout = SwiftUISnapshotLayout.device(config: .iPhone8)
1010

11+
override func setUpWithError() throws {
12+
try XCTSkipIf(UIDevice.current.userInterfaceIdiom == .pad, "Skipping on Mac Catalyst")
13+
}
14+
1115
func testBlockquote() {
1216
let view = Markdown {
1317
#"""

Tests/MarkdownUITests/ThemeDocCTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
final class ThemeDocCTests: XCTestCase {
99
private let layout = SwiftUISnapshotLayout.device(config: .iPhone8)
1010

11+
override func setUpWithError() throws {
12+
try XCTSkipIf(UIDevice.current.userInterfaceIdiom == .pad, "Skipping on Mac Catalyst")
13+
}
14+
1115
func testInlines() {
1216
let view = ThemePreview(theme: .docC) {
1317
#"""

Tests/MarkdownUITests/ThemeGitHubTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
private let layout = SwiftUISnapshotLayout.device(config: .iPhone8)
1010
private let perceptualPrecision: Float = 0.97
1111

12+
override func setUpWithError() throws {
13+
try XCTSkipIf(UIDevice.current.userInterfaceIdiom == .pad, "Skipping on Mac Catalyst")
14+
}
15+
1216
func testInlines() {
1317
let view = ThemePreview(theme: .gitHub) {
1418
#"""

0 commit comments

Comments
 (0)