Skip to content

Commit f042b38

Browse files
committed
Fix Warnings
1 parent fec3ab1 commit f042b38

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

Tests/CodeEditSourceEditorTests/Highlighting/HighlightProviderStateTest.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ class EmptyHighlightProviderStateDelegate: HighlightProviderStateDelegate {
2121
) { }
2222
}
2323

24-
@MainActor
2524
final class HighlightProviderStateTest: XCTestCase {
25+
@MainActor
2626
func test_setup() {
2727
let textView = Mock.textView()
2828
let rangeProvider = MockVisibleRangeProvider(textView: textView)
@@ -50,6 +50,7 @@ final class HighlightProviderStateTest: XCTestCase {
5050
wait(for: [setUpExpectation], timeout: 1.0)
5151
}
5252

53+
@MainActor
5354
func test_setLanguage() {
5455
let textView = Mock.textView()
5556
let rangeProvider = MockVisibleRangeProvider(textView: textView)
@@ -89,6 +90,7 @@ final class HighlightProviderStateTest: XCTestCase {
8990
wait(for: [secondSetUpExpectation], timeout: 1.0)
9091
}
9192

93+
@MainActor
9294
func test_storageUpdatedRangesPassedOn() {
9395
let textView = Mock.textView()
9496
let rangeProvider = MockVisibleRangeProvider(textView: textView)

Tests/CodeEditSourceEditorTests/HighlighterTests.swift renamed to Tests/CodeEditSourceEditorTests/Highlighting/HighlighterTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ final class HighlighterTests: XCTestCase {
4242
func test_canceledHighlightsAreInvalidated() {
4343
let highlightProvider = MockHighlightProvider()
4444
let attributeProvider = MockAttributeProvider()
45-
let theme = Mock.theme()
4645
let textView = Mock.textView()
4746
textView.frame = NSRect(x: 0, y: 0, width: 1000, height: 1000)
4847
textView.setText("Hello World!")

Tests/CodeEditSourceEditorTests/Highlighting/StyledRangeContainerTests.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import XCTest
22
@testable import CodeEditSourceEditor
33

4-
@MainActor
54
final class StyledRangeContainerTests: XCTestCase {
65
typealias Run = HighlightedRun
76

7+
@MainActor
88
func test_init() {
99
let providers = [0, 1]
1010
let store = StyledRangeContainer(documentLength: 100, providers: providers)
@@ -14,6 +14,7 @@ final class StyledRangeContainerTests: XCTestCase {
1414
XCTAssert(store._storage.values.allSatisfy({ $0.length == 100 }), "One or more providers have incorrect length")
1515
}
1616

17+
@MainActor
1718
func test_setHighlights() {
1819
let providers = [0, 1]
1920
let store = StyledRangeContainer(documentLength: 100, providers: providers)
@@ -40,6 +41,7 @@ final class StyledRangeContainerTests: XCTestCase {
4041
)
4142
}
4243

44+
@MainActor
4345
func test_overlappingRuns() {
4446
let providers = [0, 1]
4547
let store = StyledRangeContainer(documentLength: 100, providers: providers)
@@ -69,6 +71,7 @@ final class StyledRangeContainerTests: XCTestCase {
6971
)
7072
}
7173

74+
@MainActor
7275
func test_overlappingRunsWithMoreProviders() {
7376
let providers = [0, 1, 2]
7477
let store = StyledRangeContainer(documentLength: 200, providers: providers)

Tests/CodeEditSourceEditorTests/Highlighting/StyledRangeStoreTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ extension StyledRangeStore {
66
var count: Int { _guts.count }
77
}
88

9-
@MainActor
109
final class StyledRangeStoreTests: XCTestCase {
1110
override var continueAfterFailure: Bool {
1211
get { false }

Tests/CodeEditSourceEditorTests/Highlighting/VisibleRangeProviderTests.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import XCTest
22
@testable import CodeEditSourceEditor
33

4-
@MainActor
54
final class VisibleRangeProviderTests: XCTestCase {
5+
@MainActor
66
func test_updateOnScroll() {
77
let (scrollView, textView) = Mock.scrollingTextView()
88
textView.string = Array(repeating: "\n", count: 400).joined()
@@ -19,6 +19,7 @@ final class VisibleRangeProviderTests: XCTestCase {
1919
XCTAssertNotEqual(originalSet, rangeProvider.visibleSet)
2020
}
2121

22+
@MainActor
2223
func test_updateOnResize() {
2324
let (scrollView, textView) = Mock.scrollingTextView()
2425
textView.string = Array(repeating: "\n", count: 400).joined()
@@ -38,6 +39,7 @@ final class VisibleRangeProviderTests: XCTestCase {
3839
// Skipping due to a bug in the textview that returns all indices for the visible rect
3940
// when not in a scroll view
4041

42+
@MainActor
4143
func _test_updateOnResizeNoScrollView() {
4244
let textView = Mock.textView()
4345
textView.frame = NSRect(x: 0, y: 0, width: 100, height: 100)

0 commit comments

Comments
 (0)