Skip to content

Commit 33b4950

Browse files
committed
Correct unit tests
1 parent f7a2f17 commit 33b4950

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

Sources/SourceKitLSP/Swift/Diagnostic.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,8 @@ extension CodeAction {
6868
textEdits.append(TextEdit(range: startPosition..<endPosition, newText: edit.replacement))
6969
}
7070

71-
guard let title = Self.title(for: textEdits, in: snapshot) else {
72-
return nil
73-
}
74-
7571
self.init(
76-
title: title,
72+
title: fixIt.message.message.withFirstLetterUppercased(),
7773
kind: .quickFix,
7874
diagnostics: nil,
7975
edit: WorkspaceEdit(changes: [snapshot.uri: textEdits])

Tests/SourceKitLSPTests/CodeActionTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ final class CodeActionTests: XCTestCase {
446446

447447
let expectedCodeActions = [
448448
CodeAction(
449-
title: "Replace 'Multi ' with 'Multiident '...",
449+
title: "Join the identifiers together",
450450
kind: .quickFix,
451451
edit: WorkspaceEdit(
452452
changes: [
@@ -458,7 +458,7 @@ final class CodeActionTests: XCTestCase {
458458
)
459459
),
460460
CodeAction(
461-
title: "Replace 'Multi ' with 'MultiIdent '...",
461+
title: "Join the identifiers together with camel-case",
462462
kind: .quickFix,
463463
edit: WorkspaceEdit(
464464
changes: [

0 commit comments

Comments
 (0)