Skip to content

Commit ca1aa65

Browse files
committed
[CodeCompletion] Update tests for CodeComletionString::getName() obsoletion
rdar://80801210
1 parent df2b971 commit ca1aa65

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

test/IDE/complete_diagnostics_concurrency.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ actor MyActor {
1818
func testAsyncContext() {
1919
#^SYNC_CONTEXT^#
2020
// SYNC_CONTEXT: Begin completions
21-
// SYNC_CONTEXT-DAG: Decl[FreeFunction]/CurrModule/NotRecommended: asyncFunc()[' async'][#Void#]; name=asyncFunc() async; diagnostics=error:async 'asyncFunc()' used in a context that does not support concurrency{{$}}
21+
// SYNC_CONTEXT-DAG: Decl[FreeFunction]/CurrModule/NotRecommended: asyncFunc()[' async'][#Void#]; name=asyncFunc(); diagnostics=error:async 'asyncFunc()' used in a context that does not support concurrency{{$}}
2222
// SYNC_CONTEXT-DAG: Decl[FreeFunction]/CurrModule: syncFunc()[#Void#]; name=syncFunc(){{$}}
2323
// SYNC_CONTEXT: End completions
2424
}
2525

2626
func testActor(obj: MyActor) async {
2727
obj.#^ACTOR^#
2828
// ACTOR: Begin completions
29-
// ACTOR-DAG: Decl[InstanceMethod]/CurrNominal: receiveSendable({#arg: MySendable#})[' async'][#Void#]; name=receiveSendable(arg: MySendable) async{{$}}
30-
// ACTOR-DAG: Decl[InstanceMethod]/CurrNominal/NotRecommended: receiveNonSendable({#arg: MyNonSendable#})[' async'][#Void#]; name=receiveNonSendable(arg: MyNonSendable) async; diagnostics=warning:actor-isolated 'receiveNonSendable(arg:)' should only be referenced from inside the actor{{$}}
29+
// ACTOR-DAG: Decl[InstanceMethod]/CurrNominal: receiveSendable({#arg: MySendable#})[' async'][#Void#]; name=receiveSendable(arg:){{$}}
30+
// ACTOR-DAG: Decl[InstanceMethod]/CurrNominal/NotRecommended: receiveNonSendable({#arg: MyNonSendable#})[' async'][#Void#]; name=receiveNonSendable(arg:); diagnostics=warning:actor-isolated 'receiveNonSendable(arg:)' should only be referenced from inside the actor{{$}}
3131
// ACTOR: End completions
3232
}

test/IDE/complete_sourcefileinfo.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// RUN: %empty-directory(%t)
32

43
// RUN: %empty-directory(%t/Sources)
@@ -54,7 +53,7 @@ func test(val: MyStruct) {
5453
// MEMBER-LABEL: Begin completions, 5 items
5554
// MEMBER-DAG: Keyword[self]/CurrNominal: self[#MyStruct#]; name=self{{$}}
5655
// MEMBER-DAG: Decl[InstanceVar]/CurrNominal: propertyInType[#Int#]; name=propertyInType; source={{.*}}/Sources/MyModule1.swift
57-
// MEMBER-DAG: Decl[InstanceMethod]/CurrNominal: funcInType({#x: Int#})[#Void#]; name=funcInType(x: Int); source={{.*}}/Sources/MyModule1.swift
56+
// MEMBER-DAG: Decl[InstanceMethod]/CurrNominal: funcInType({#x: Int#})[#Void#]; name=funcInType(x:); source={{.*}}/Sources/MyModule1.swift
5857
// MEMBER-DAG: Decl[InstanceVar]/CurrNominal: propertyInExtension[#String#]; name=propertyInExtension; source={{.*}}/Sources/MyModule2.swift
5958
// MEMBER-DAG: Decl[InstanceMethod]/CurrNominal: funcInExtension()[#String#]; name=funcInExtension(); source={{.*}}/Sources/MyModule2.swift
6059
// MEMBER: End completions
@@ -66,7 +65,7 @@ func test(val: MyStruct) {
6665
// MEMBER_MOD-LABEL: Begin completions, 5 items
6766
// MEMBER_MOD-DAG: Keyword[self]/CurrNominal: self[#MyStruct#]; name=self{{$}}
6867
// MEMBER_MOD-DAG: Decl[InstanceVar]/CurrNominal: propertyInType[#Int#]; name=propertyInType; source={{.*}}/Sources/MyModule1.swift
69-
// MEMBER_MOD-DAG: Decl[InstanceMethod]/CurrNominal: funcInType({#x: Int#})[#Void#]; name=funcInType(x: Int); source={{.*}}/Sources/MyModule1.swift
68+
// MEMBER_MOD-DAG: Decl[InstanceMethod]/CurrNominal: funcInType({#x: Int#})[#Void#]; name=funcInType(x:); source={{.*}}/Sources/MyModule1.swift
7069
// MEMBER_MOD-DAG: Decl[InstanceVar]/CurrNominal: propertyInExtension[#String#]; name=propertyInExtension; source={{.*}}/Sources/MyModule2.swift
7170
// MEMBER_MOD-DAG: Decl[InstanceMethod]/CurrNominal: funcInExtension()[#String#]; name=funcInExtension(); source={{.*}}/Sources/MyModule2.swift
7271
// MEMBER_MOD: End completions

0 commit comments

Comments
 (0)