mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Unless you're familiar with the way the swift source code is organized, it's not clear what "SourceDocInfo" means, or how it is different from DocSupport, etc. Move the tests into directories that are named based on their request (note: we already had one test under CursorInfo, which just made things even more confusing).
22 lines
753 B
Swift
22 lines
753 B
Swift
func testGenerics<T>(x: T) {
|
|
}
|
|
|
|
/// Doc Comment...
|
|
func testGenericsWithComment<T>(x: T) {
|
|
}
|
|
|
|
func someFunc <A>() -> A {
|
|
fatalError()
|
|
}
|
|
|
|
// RUN: %sourcekitd-test -req=cursor -pos=1:10 %s -- %s | FileCheck -check-prefix=CHECK1 %s
|
|
// CHECK1: <Declaration>func testGenerics<T>(x: <Type usr="s:tF15cursor_generics12testGenericsurFxT_L_1TMx">T</Type>)</Declaration>
|
|
|
|
// RUN: %sourcekitd-test -req=cursor -pos=5:10 %s -- %s | FileCheck -check-prefix=CHECK2 %s
|
|
// CHECK2: <Function
|
|
// CHECK2: <Declaration>func testGenericsWithComment<T>(x: T)</Declaration>
|
|
|
|
// RUN: %sourcekitd-test -req=cursor -pos=8:16 %s -- %s | FileCheck -check-prefix=CHECK3 %s
|
|
// CHECK3: source.lang.swift.decl.generic_type_param
|
|
// CHECK3: <Declaration>A</Declaration>
|