Skip to content

Commit 9f21b4a

Browse files
committed
Fix remaining SourceKit tests
1 parent 8d35ed0 commit 9f21b4a

File tree

8 files changed

+17
-1
lines changed

8 files changed

+17
-1
lines changed

test/SourceKit/CompileNotifications/diagnostics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
// INVALID_ARG-NEXT: key.filepath: "<unknown>"
8181
// INVALID_ARG-NEXT: key.severity: source.diagnostic.severity.error,
8282
// INVALID_ARG-NEXT: key.offset: 0
83-
// INVALID_ARG-NEXT: key.id: "error_from_clang"
83+
// INVALID_ARG-NEXT: key.id: "{{error_from_clang|error_unknown_arg}}"
8484
// INVALID_ARG-NEXT: key.description: "unknown argument
8585

8686
// Ignore the spurious -wmo + -enable-batch-mode warning.

test/SourceKit/Sema/enum-toraw/enum-toraw.swift.response

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
key.column: 1,
1919
key.filepath: t2.swift,
2020
key.severity: source.diagnostic.severity.error,
21+
key.id: "missing_return_decl",
2122
key.description: "missing return in global function expected to return 'Bool'",
2223
key.diagnostic_stage: source.diagnostic.stage.swift.sema
2324
}

test/SourceKit/Sema/main.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// RUN: %sourcekitd-test -req=sema %S/Inputs/top_level.swift -- %s %S/Inputs/top_level.swift -module-name main | %FileCheck %s -check-prefix=TOP_LEVEL_ERROR
77
// TOP_LEVEL_ERROR: key.filepath: {{.*}}top_level.swift
88
// TOP_LEVEL_ERROR-NEXT: key.severity: source.diagnostic.severity.error,
9+
// TOP_LEVEL_ERROR-NEXT: key.id: "illegal_top_level_expr"
910
// TOP_LEVEL_ERROR-NEXT: key.description: {{.*}}top level
1011

1112
print("hi") // Top-level code.

test/SourceKit/Sema/sema_build_session.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,19 @@ func test() {
4444

4545
// CHECK_SYSTEM_2-LABEL: ## THREE
4646
// CHECK_SYSTEM_2: key.severity: source.diagnostic.severity.error,
47+
// CHECK_SYSTEM_2-NEXT: key.id: "cannot_find_in_scope",
4748
// CHECK_SYSTEM_2-NEXT: key.description: "cannot find 'fooFunc' in scope",
4849
// CHECK_SYSTEM_2: key.severity: source.diagnostic.severity.error,
50+
// CHECK_SYSTEM_2-NEXT: key.id: "cannot_find_in_scope",
4951
// CHECK_SYSTEM_2-NEXT: key.description: "cannot find 'fooSubFunc' in scope",
5052
// CHECK_SYSTEM_2: key.severity: source.diagnostic.severity.error,
53+
// CHECK_SYSTEM_2-NEXT: key.id: "cannot_find_in_scope",
5154
// CHECK_SYSTEM_2-NEXT: key.description: "cannot find 'fooHelperFunc' in scope",
5255
// CHECK_SYSTEM_2: key.severity: source.diagnostic.severity.error,
56+
// CHECK_SYSTEM_2-NEXT: key.id: "cannot_find_in_scope",
5357
// CHECK_SYSTEM_2-NEXT: key.description: "cannot find 'fooHelperSubFunc' in scope",
5458
// CHECK_SYSTEM_2: key.severity: source.diagnostic.severity.error,
59+
// CHECK_SYSTEM_2-NEXT: key.id: "cannot_find_in_scope",
5560
// CHECK_SYSTEM_2-NEXT: key.description: "cannot find 'fooHelperExplicitFunc' in scope",
5661

5762
// -----------------------------------------------------------------------------
@@ -78,8 +83,10 @@ func test() {
7883
// CHECK_USER-LABEL: ## TWO
7984
// CHECK_USER-NOT: key.severity:
8085
// CHECK_USER: key.severity: source.diagnostic.severity.error,
86+
// CHECK_USER-NEXT: key.id: "cannot_find_in_scope",
8187
// CHECK_USER-NEXT: key.description: "cannot find 'fooFunc' in scope",
8288
// CHECK_USER: key.severity: source.diagnostic.severity.error,
89+
// CHECK_USER-NEXT: key.id: "cannot_find_in_scope",
8390
// CHECK_USER-NEXT: key.description: "cannot find 'fooSubFunc' in scope",
8491
// CHECK_USER-NOT: key.severity:
8592

test/SourceKit/Sema/sema_module.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ Swift.String
33
Swift
44
// CHECK: key.kind: source.lang.swift.ref.struct,
55
// CHECK: key.severity: source.diagnostic.severity.error,
6+
// CHECK-NEXT: key.id: "value_of_metatype_type",
67
// CHECK-NEXT: key.description: "expected member name or constructor call after type name",

test/SourceKit/Sema/sema_playground.swift.response

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
key.column: 5,
1212
key.filepath: sema_playground.swift,
1313
key.severity: source.diagnostic.severity.error,
14+
key.id: "dollar_identifier_decl",
1415
key.description: "cannot declare entity named '$blah'; the '$' prefix is reserved for implicitly-synthesized declarations",
1516
key.diagnostic_stage: source.diagnostic.stage.swift.sema
1617
}

test/SourceKit/Sema/sema_symlink.swift.response

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
key.column: 16,
1313
key.filepath: real.swift,
1414
key.severity: source.diagnostic.severity.error,
15+
key.id: "cannot_find_in_scope",
1516
key.description: "cannot find 'goo' in scope",
1617
key.diagnostic_stage: source.diagnostic.stage.swift.sema,
1718
key.ranges: [

test/SourceKit/SyntaxMapData/diags.swift.response

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
key.column: 10,
66
key.filepath: parse_error.swift,
77
key.severity: source.diagnostic.severity.error,
8+
key.id: "func_decl_without_paren",
89
key.description: "expected '(' in argument list of function declaration",
910
key.diagnostic_stage: source.diagnostic.stage.swift.sema,
1011
key.fixits: [
@@ -20,6 +21,7 @@
2021
key.column: 8,
2122
key.filepath: parse_error.swift,
2223
key.severity: source.diagnostic.severity.error,
24+
key.id: "cannot_find_type_in_scope",
2325
key.description: "cannot find type 'Undeclared' in scope",
2426
key.diagnostic_stage: source.diagnostic.stage.swift.sema,
2527
key.ranges: [
@@ -36,6 +38,7 @@
3638
key.column: 13,
3739
key.filepath: parse_error.swift,
3840
key.severity: source.diagnostic.severity.error,
41+
key.id: "func_decl_without_paren",
3942
key.description: "expected '(' in argument list of function declaration",
4043
key.diagnostic_stage: source.diagnostic.stage.swift.sema,
4144
key.fixits: [
@@ -51,6 +54,7 @@
5154
key.column: 8,
5255
key.filepath: parse_error.swift,
5356
key.severity: source.diagnostic.severity.error,
57+
key.id: "cannot_find_type_in_scope",
5458
key.description: "cannot find type 'Undeclared' in scope",
5559
key.diagnostic_stage: source.diagnostic.stage.swift.sema,
5660
key.ranges: [

0 commit comments

Comments
 (0)