Skip to content

Commit 6d30c78

Browse files
committed
Re-enable disabled unit tests
1 parent f69bb6f commit 6d30c78

13 files changed

+10
-31
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 5.9
1+
// swift-tools-version: 6.0
22

33
import PackageDescription
44

Tests/RichTextKitTests/RichTextEditorTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import RichTextKit
1111
import SwiftUI
1212
import XCTest
1313

14-
/*
14+
@MainActor
1515
final class RichTextEditorTests: XCTestCase {
1616

1717
private var text: NSAttributedString!
@@ -55,5 +55,4 @@ final class RichTextEditorTests: XCTestCase {
5555
XCTAssertTrue(coordinator.context === context)
5656
}
5757
}
58-
*/
5958
#endif

Tests/RichTextKitTests/RichTextViewIntegrationTests+UIKit.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
//
77

88
#if os(iOS)
9-
import UIKit
10-
119
import CoreGraphics
1210
import SwiftUI
13-
@testable import RichTextKit
11+
import UIKit
1412
import XCTest
1513

16-
/*
14+
@testable import RichTextKit
15+
16+
@MainActor
1717
final class RichTextViewIntegrationTests: XCTestCase {
1818

1919
private var text: NSAttributedString!
@@ -135,5 +135,4 @@ final class RichTextViewIntegrationTests: XCTestCase {
135135
XCTAssertTrue(try XCTUnwrap(fontForLastString?.fontDescriptor.symbolicTraits.contains(.traitBold)))
136136
}
137137
}
138-
*/
139138
#endif

Tests/RichTextKitTests/RichTextViewRepresentable+AlignmentTests.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import AppKit
1818
import RichTextKit
1919
import XCTest
2020

21-
/*
2221
final class RichTextViewComponent_AlignmentTests: XCTestCase {
2322

2423
private var textView: RichTextViewComponent!
@@ -95,5 +94,4 @@ final class RichTextViewComponent_AlignmentTests: XCTestCase {
9594
#endif
9695
}
9796
}
98-
*/
9997
#endif

Tests/RichTextKitTests/RichTextViewRepresentable+AttributesTests.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import AppKit
1818
import RichTextKit
1919
import XCTest
2020

21-
/*
2221
final class RichTextViewComponent_AttributesTests: XCTestCase {
2322

2423
private var textView: RichTextViewComponent!
@@ -101,5 +100,4 @@ private extension RichTextViewComponent_AttributesTests {
101100
assertNonEqualAttribute(attr[.font])
102101
}
103102
}
104-
*/
105103
#endif

Tests/RichTextKitTests/RichTextViewRepresentable+ColorTests.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import AppKit
1818
import RichTextKit
1919
import XCTest
2020

21-
/*
2221
final class RichTextViewComponent_ColorTests: XCTestCase {
2322

2423
private var textView: RichTextViewComponent!
@@ -96,5 +95,4 @@ final class RichTextViewComponent_ColorTests: XCTestCase {
9695
assertEqualColor(textView.typingAttributes[.foregroundColor])
9796
}
9897
}
99-
*/
10098
#endif

Tests/RichTextKitTests/RichTextViewRepresentable+FontSizeTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import AppKit
1717
#if iOS || macOS || os(tvOS)
1818
import RichTextKit
1919
import XCTest
20-
/*
20+
2121
final class RichTextViewComponent_FontSizeTests: XCTestCase {
2222

2323
private var textView: RichTextViewComponent!
@@ -106,5 +106,4 @@ private extension RichTextViewComponent_FontSizeTests {
106106
XCTAssertNotEqual((attr as? FontRepresentable)?.pointSize, size)
107107
}
108108
}
109-
*/
110109
#endif

Tests/RichTextKitTests/RichTextViewRepresentable+StylesTests.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import AppKit
1818
import RichTextKit
1919
import XCTest
2020

21-
/*
2221
final class RichTextViewComponent_StylesTests: XCTestCase {
2322

2423
private var textView: RichTextViewComponent!
@@ -80,5 +79,4 @@ final class RichTextViewComponent_StylesTests: XCTestCase {
8079
XCTAssertFalse(textView.richTextStyles.hasStyle(.underlined))
8180
}
8281
}
83-
*/
8482
#endif

Tests/RichTextKitTests/RichTextViewRepresentableTests.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import RichTextKit
1111
import XCTest
1212

13-
/*
1413
final class RichTextViewComponentTests: XCTestCase {
1514

1615
private var view: RichTextView!
@@ -85,5 +84,4 @@ final class RichTextViewComponentTests: XCTestCase {
8584
#endif
8685
}
8786
}
88-
*/
8987
#endif

Tests/RichTextKitTests/_Foundation/RichTextCoordinator+SubscriptionsTests.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import RichTextKit
1111
import SwiftUI
1212
import XCTest
1313

14-
/*
14+
@MainActor
1515
final class RichTextCoordinator_SubscriptionsTests: XCTestCase {
1616

1717
private var text: NSAttributedString!
@@ -49,11 +49,10 @@ final class RichTextCoordinator_SubscriptionsTests: XCTestCase {
4949
XCTAssertNotNil(coordinator)
5050
}
5151

52-
func testFontNameChangesUpdatesTextView() {
52+
func testFontNameChangesUpdatesTextView() async {
5353
XCTAssertNotEqual(textView.richTextFont?.fontName, "Arial")
5454
textContext.fontName = ""
55-
56-
eventually {
55+
await MainActor.run {
5756
#if iOS || os(tvOS)
5857
XCTAssertEqual(self.textView.richTextFont?.fontName, ".SFUI-Regular")
5958
#elseif macOS
@@ -132,5 +131,4 @@ final class RichTextCoordinator_SubscriptionsTests: XCTestCase {
132131
XCTAssertEqual(textView.richTextAlignment, .right)
133132
}
134133
}
135-
*/
136134
#endif

0 commit comments

Comments
 (0)