/// top-level var 1 comment var topLevelVar1 = "Swift" /// top-level var 2 comment /// /// the meaning of life var topLevelVar2 = 42 /// top-level func 1 comment /// /// Does stuff. func topLevelFunc1() {} /// top-level func 2 comment func topLevelFunc2() {} /// struct S1 /// /// More info on struct S struct S1 {} /// C1 description /// /// does some work class C1 {} /// P1 description /// /// defines some functionality protocol P1 {} struct S2: P1 {} #^TOP_LEVEL^# // RUN: %target-swift-ide-test -code-completion -source-filename %s -module-name CompleteDocTest -code-completion-comments -code-completion-sort-by-name -code-completion-token=TOP_LEVEL | %FileCheck %s --check-prefix=TOP-LEVEL // TOP-LEVEL-LABEL: Decl[Class]/CurrModule: C1[#C1#]; name=C1; // TOP-LEVEL-SAME: briefcomment=C1 description; // TOP-LEVEL-SAME: xmlcomment=C1s:15CompleteDocTest2C1Cclass C1C1 descriptiondoes some work; // TOP-LEVEL-SAME: rawcomment=C1 description // TOP-LEVEL-EMPTY: // TOP-LEVEL-NEXT: does some work // TOP-LEVEL-LABEL: Decl[Protocol]/CurrModule/Flair[RareType]: P1[#P1#]; name=P1; // TOP-LEVEL-SAME: briefcomment=P1 description; // TOP-LEVEL-SAME: xmlcomment=P1s:15CompleteDocTest2P1Pprotocol P1P1 descriptiondefines some functionality; // TOP-LEVEL-SAME: rawcomment=P1 description // TOP-LEVEL-EMPTY: // TOP-LEVEL-NEXT: defines some functionality // TOP-LEVEL-LABEL: Decl[Struct]/CurrModule: S1[#S1#]; name=S1; // TOP-LEVEL-SAME: briefcomment=struct S1; // TOP-LEVEL-SAME: xmlcomment=S1s:15CompleteDocTest2S1Vstruct S1struct S1More info on struct S; // TOP-LEVEL-SAME: rawcomment=struct S1 // TOP-LEVEL-EMPTY: // TOP-LEVEL-NEXT: More info on struct S // TOP-LEVEL-LABEL: Decl[Struct]/CurrModule: S2[#S2#]; name=S2{{$}} // TOP-LEVEL-LABEL: Decl[FreeFunction]/CurrModule: topLevelFunc1()[#Void#]; name=topLevelFunc1(); // TOP-LEVEL-SAME: briefcomment=top-level func 1 comment; // TOP-LEVEL-SAME: xmlcomment=topLevelFunc1()s:15CompleteDocTest13topLevelFunc1yyFfunc topLevelFunc1()top-level func 1 commentDoes stuff.; // TOP-LEVEL-SAME: rawcomment=top-level func 1 comment // TOP-LEVEL-EMPTY: // TOP-LEVEL-NEXT: Does stuff. // TOP-LEVEL-LABEL: Decl[FreeFunction]/CurrModule: topLevelFunc2()[#Void#]; name=topLevelFunc2(); // TOP-LEVEL-SAME: briefcomment=top-level func 2 comment; // TOP-LEVEL-SAME: xmlcomment=topLevelFunc2()s:15CompleteDocTest13topLevelFunc2yyFfunc topLevelFunc2()top-level func 2 comment; // TOP-LEVEL-SAME: rawcomment=top-level func 2 comment // TOP-LEVEL-LABEL: Decl[GlobalVar]/Local: topLevelVar1[#String#]; name=topLevelVar1; // TOP-LEVEL-SAME: briefcomment=top-level var 1 comment; // TOP-LEVEL-SAME: xmlcomment=topLevelVar1s:15CompleteDocTest12topLevelVar1SSvpvar topLevelVar1: Stringtop-level var 1 comment; // TOP-LEVEL-SAME: rawcomment=top-level var 1 comment // TOP-LEVEL-LABEL: Decl[GlobalVar]/Local: topLevelVar2[#Int#]; name=topLevelVar2; // TOP-LEVEL-SAME: briefcomment=top-level var 2 comment; // TOP-LEVEL-SAME: xmlcomment=topLevelVar2s:15CompleteDocTest12topLevelVar2Sivpvar topLevelVar2: Inttop-level var 2 commentthe meaning of life; // TOP-LEVEL-SAME: rawcomment=top-level var 2 comment // TOP-LEVEL-EMPTY: // TOP-LEVEL-NEXT: the meaning of life