Skip to content

Commit 31152de

Browse files
authored
Merge pull request #888 from ahoppen/ahoppen/older-toolchains
Make `PullDiagnosticsTests.testCodeActions` pass with older toolchains
2 parents 779a3c3 + eb47ba6 commit 31152de

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Tests/SourceKitLSPTests/PullDiagnosticsTests.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,13 @@ final class PullDiagnosticsTests: XCTestCase {
132132

133133
XCTAssertEqual(actions.count, 1)
134134
let action = try XCTUnwrap(actions.first)
135-
XCTAssertEqual(action.title, "add stubs for conformance")
135+
// Allow the action message to be the one before or after
136+
// https://github.com/apple/swift/pull/67909, ensuring this test passes with
137+
// a sourcekitd that contains the change from that PR as well as older
138+
// toolchains that don't contain the change yet.
139+
XCTAssert([
140+
"add stubs for conformance",
141+
"do you want to add protocol stubs?"
142+
].contains(action.title))
136143
}
137144
}

0 commit comments

Comments
 (0)