Skip to content

Commit c298626

Browse files
committed
Update test for new refactoring action
1 parent b628738 commit c298626

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

Tests/SourceKitLSPTests/PullDiagnosticsTests.swift

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,18 @@ final class PullDiagnosticsTests: XCTestCase {
9393
return
9494
}
9595

96-
XCTAssertEqual(actions.count, 1)
97-
let action = try XCTUnwrap(actions.first)
98-
// Allow the action message to be the one before or after
99-
// https://github.com/apple/swift/pull/67909, ensuring this test passes with
100-
// a sourcekitd that contains the change from that PR as well as older
101-
// toolchains that don't contain the change yet.
96+
XCTAssertEqual(actions.count, 2)
10297
XCTAssert(
103-
[
104-
"Add stubs for conformance",
105-
"Do you want to add protocol stubs?",
106-
].contains(action.title)
98+
actions.contains { action in
99+
// Allow the action message to be the one before or after
100+
// https://github.com/apple/swift/pull/67909, ensuring this test passes with
101+
// a sourcekitd that contains the change from that PR as well as older
102+
// toolchains that don't contain the change yet.
103+
[
104+
"Add stubs for conformance",
105+
"Do you want to add protocol stubs?",
106+
].contains(action.title)
107+
}
107108
)
108109
}
109110

0 commit comments

Comments
 (0)