Files
swift-mirror/test/IDE/complete_effectful_accessor.swift
Alex Hoppen 32eff21977 [IDE] Remove "Begin completions" and "End completions" from test cases
These test lines weren't actually providing any value and were annoying to write. Let's jut remove them.
2023-03-22 09:07:17 -07:00

48 lines
1.2 KiB
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-ide-test -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t
var globalAsyncVar: Int {
get async {
42
}
}
var globalAsyncThrowingVar: Int {
get async throws {
42
}
}
struct Foo {
var asyncProperty: Int {
get async {
42
}
}
var asyncThrowingProperty: Int {
get async throws {
42
}
}
func asyncFunc() async -> Int { 42 }
func asyncThrowingFunc() async throws -> Int { 42 }
func testMember(f: Foo) async throws {
f.#^MEMBER^#
}
func testGlobal() async throws {
#^GLOBAL^#
}
}
// MEMBER-DAG: Decl[InstanceVar]/CurrNominal: asyncProperty[#Int#][' async'];
// MEMBER-DAG: Decl[InstanceVar]/CurrNominal: asyncThrowingProperty[#Int#][' async'][' throws'];
// MEMBER-DAG: Decl[InstanceMethod]/CurrNominal: asyncFunc()[' async'][#Int#];
// MEMBER-DAG: Decl[InstanceMethod]/CurrNominal: asyncThrowingFunc()[' async'][' throws'][#Int#];
// GLOBAL-DAG: Decl[GlobalVar]/CurrModule: globalAsyncVar[#Int#][' async'];
// GLOBAL-DAG: Decl[GlobalVar]/CurrModule: globalAsyncThrowingVar[#Int#][' async'][' throws']