// This is an input file for comment-to-{XML,Doxygen} conversion tests. // // Please keep this file in alphabetical order! @objc class A000 {} // CHECK: {{.*}}DocCommentAsXML=none /// Aaa. A010. Bbb. @objc class A010_AttachToEntities { // CHECK: {{.*}}DocCommentAsXML=[A010_AttachToEntitiess:C14swift_ide_test21A010_AttachToEntities@objc class A010_AttachToEntitiesAaa. A010. Bbb.] /// Aaa. init(). init() {} // CHECK: {{.*}}DocCommentAsXML=[init()s:FC14swift_ide_test21A010_AttachToEntitiescFT_S0_init()Aaa. init().] /// Aaa. subscript(i: Int). subscript(i: Int) -> Int { // CHECK: {{.*}}DocCommentAsXML=[subscript(_:)s:iC14swift_ide_test21A010_AttachToEntities9subscriptFSiSisubscript(i: Int) -> Int { get set }Aaa. subscript(i: Int).] get { // CHECK: {{.*}}DocCommentAsXML=none return 0 } set {} // CHECK: {{.*}}DocCommentAsXML=none } // CHECK: {{.*}}DocCommentAsXML=none /// Aaa. v1. var v1: Int = 0 // CHECK: {{.*}}DocCommentAsXML=[v1s:vC14swift_ide_test21A010_AttachToEntities2v1Sivar v1: IntAaa. v1.] /// Aaa. v2. class var v2: Int { return 0 } // CHECK: {{.*}}DocCommentAsXML=[v2s:ZvC14swift_ide_test21A010_AttachToEntities2v2Siclass var v2: Int { get }Aaa. v2.] // CHECK: {{.*}}DocCommentAsXML=none } /// Aaa. A011. struct A011_AttachToEntities { } // CHECK: {{.*}}DocCommentAsXML=[A011_AttachToEntitiess:V14swift_ide_test21A011_AttachToEntitiesstruct A011_AttachToEntitiesAaa. A011.] /// Aaa. A012. enum A012_AttachToEntities { case A } // CHECK: {{.*}}DocCommentAsXML=[A012_AttachToEntitiess:O14swift_ide_test21A012_AttachToEntitiesenum A012_AttachToEntitiesAaa. A012.] // CHECK: {{.*}}DocCommentAsXML=none /// Aaa. A013. @objc protocol A013_AttachToEntities {} // CHECK: {{.*}}DocCommentAsXML=[A013_AttachToEntitiess:P14swift_ide_test21A013_AttachToEntities@objc protocol A013_AttachToEntitiesAaa. A013.] @objc class AutomaticLink { // CHECK: {{.*}}DocCommentAsXML=none /// And now for a URL. /// /// func f0() {} // CHECK: {{.*}}DocCommentAsXML=[f0()s:FC14swift_ide_test13AutomaticLink2f0FT_T_func f0()And now for a URL.http://developer.apple.com/swift/] } @objc class BlockQuote { // CHECK: {{.*}}DocCommentAsXML=none /// Aaa. /// /// > Bbb. /// /// > Ccc. func f0() {} // CHECK: {{.*}}DocCommentAsXML=[f0()s:FC14swift_ide_test10BlockQuote2f0FT_T_func f0()Aaa.Bbb.Ccc.] } @objc class ATXHeaders { // CHECK: {{.*}}DocCommentAsXML=none /// LEVEL ONE /// ========= /// /// LEVEL TWO /// --------- func f0() {} // CHECK: {{.*}}DocCommentAsXML=[f0()s:FC14swift_ide_test10ATXHeaders2f0FT_T_func f0()]]>LEVEL ONE]]>]]>LEVEL TWO]]>] } @objc class Brief { // CHECK: {{.*}}DocCommentAsXML=none /// Aaa. func f0() {} // CHECK: {{.*}}DocCommentAsXML=[f0()s:FC14swift_ide_test5Brief2f0FT_T_func f0()Aaa.] /// Aaa. /// /// Bbb. func f1() {} // CHECK: {{.*}}DocCommentAsXML=[f1()s:FC14swift_ide_test5Brief2f1FT_T_func f1()Aaa.Bbb.] /// Aaa. /// ///> Bbb. func f2() {} // CHECK: {{.*}}DocCommentAsXML=[f2()s:FC14swift_ide_test5Brief2f2FT_T_func f2()Aaa.Bbb.] /// Aaa. /// /// Bbb. func f3() {} // CHECK: {{.*}}DocCommentAsXML=[f3()s:FC14swift_ide_test5Brief2f3FT_T_func f3()Aaa.Bbb.] } @objc class CodeBlock { // CHECK: {{.*}}DocCommentAsXML=none /// This is how you use this code. /// /// f0() // WOW! /// f0() // WOW! /// f0() // WOW! func f0() {} // CHECK: DocCommentAsXML=[f0()s:FC14swift_ide_test9CodeBlock2f0FT_T_func f0()This is how you use this code.] } @objc class EmptyComments { // CHECK: {{.*}}DocCommentAsXML=none /// func f0() {} // CHECK: {{.*}}DocCommentAsXML=[f0()s:FC14swift_ide_test13EmptyComments2f0FT_T_func f0()] /// Aaa. func f1() {} // CHECK: {{.*}}DocCommentAsXML=[f1()s:FC14swift_ide_test13EmptyComments2f1FT_T_func f1()Aaa.] /** */ func f2() {} // CHECK: {{.*}}DocCommentAsXML=[f2()s:FC14swift_ide_test13EmptyComments2f2FT_T_func f2()] /** */ func f3() {} // CHECK: {{.*}}DocCommentAsXML=[f3()s:FC14swift_ide_test13EmptyComments2f3FT_T_func f3()] /** * Aaa. */ func f4() {} // CHECK: {{.*}}DocCommentAsXML=[f4()s:FC14swift_ide_test13EmptyComments2f4FT_T_func f4()Aaa.] } @objc class Emphasis { // CHECK: {{.*}}DocCommentAsXML=none /// Aaa *bbb* ccc. /// Aaa _bbb_ ccc. func f0() {} // CHECK: {{.*}}DocCommentAsXML=[f0()s:FC14swift_ide_test8Emphasis2f0FT_T_func f0()Aaa bbb ccc. Aaa bbb ccc.] } @objc class HasThrowingFunction { // CHECK: {{.*}}DocCommentAsXML=none /// Might throw something. /// /// - parameter x: A number /// - throws: An error if `x == 0` @objc func f1(x: Int) /*throws*/ {} // CHECK: {{.*}}DocCommentAsXML=[f1(_:)s:FC14swift_ide_test19HasThrowingFunction2f1FSiT_@objc func f1(x: Int)Might throw something.xinA numberAn error if x == 0] } @objc class HorizontalRules { // CHECK: {{.*}}DocCommentAsXML=none /// Briefly. /// /// ------------------------------------ /// /// The end. func f0() {} // CHECK: {{.*}}DocCommentAsXML=[f0()s:FC14swift_ide_test15HorizontalRules2f0FT_T_func f0()Briefly.]]>The end.] } @objc class ImplicitNameLink { // CHECK: {{.*}}DocCommentAsXML=none /// [Apple][] /// /// [Apple]: https://www.apple.com/ func f0() {} } @objc class InlineCode { // CHECK: {{.*}}DocCommentAsXML=none /// Aaa `bbb` ccc. func f0() {} // CHECK: {{.*}}DocCommentAsXML=[f0()s:FC14swift_ide_test10InlineCode2f0FT_T_func f0()Aaa bbb ccc.] } @objc class InlineLink { // CHECK: {{.*}}DocCommentAsXML=none /// Aaa [bbb](/path/to/something) ccc. func f0() {} // CHECK: {{.*}}DocCommentAsXML=[f0()s:FC14swift_ide_test10InlineLink2f0FT_T_func f0()Aaa bbb ccc.] } /// - parameter x: A number @objc class ParamAndReturns { // CHECK: {{.*}}DocCommentAsXML=[ParamAndReturnss:C14swift_ide_test15ParamAndReturns@objc class ParamAndReturnsxinA number] /// Aaa. f0. /// /// - parameter first: Bbb. /// /// - parameter second: Ccc. Ddd. /// Eee. func f0(first: Int, second: Double) {} // CHECK: {{.*}}DocCommentAsXML=[f0(_:second:)s:FC14swift_ide_test15ParamAndReturns2f0FTSi6secondSd_T_func f0(first: Int, second: Double)Aaa. f0.firstinBbb.secondinCcc. Ddd. Eee.] // CHECK: {{.*}}DocCommentAsXML=none // CHECK: {{.*}}DocCommentAsXML=none /// Aaa. f1. /// /// - parameter first: Bbb. /// /// - returns: Ccc. /// Ddd. func f1(first: Int) {} // CHECK: {{.*}}DocCommentAsXML=[f1(_:)s:FC14swift_ide_test15ParamAndReturns2f1FSiT_func f1(first: Int)Aaa. f1.firstinBbb.Ccc. Ddd.] // CHECK: {{.*}}DocCommentAsXML=none /// Aaa. f2. /// /// - parameter first: /// /// - parameter second: Aaa. /// /// - parameter third: /// Bbb. func f2(first: Int, second: Double, third: Float) {} // CHECK: {{.*}}DocCommentAsXML=[f2(_:second:third:)s:FC14swift_ide_test15ParamAndReturns2f2FTSi6secondSd5thirdSf_T_func f2(first: Int, second: Double, third: Float)Aaa. f2.firstinsecondinAaa.thirdin Bbb.] // CHECK: {{.*}}DocCommentAsXML=none // CHECK: {{.*}}DocCommentAsXML=none // CHECK: {{.*}}DocCommentAsXML=none /// Aaa. f3. /// /// - parameter first: Bbb. /// - parameter second: Ccc. /// - parameter third: Ddd. func f3(first: Int, second: Double, third: Float) {} // CHECK: {{.*}}DocCommentAsXML=[f3(_:second:third:)s:FC14swift_ide_test15ParamAndReturns2f3FTSi6secondSd5thirdSf_T_func f3(first: Int, second: Double, third: Float)Aaa. f3.firstinBbb.secondinCcc.thirdinDdd.] // CHECK: {{.*}}DocCommentAsXML=none // CHECK: {{.*}}DocCommentAsXML=none // CHECK: {{.*}}DocCommentAsXML=none /// Aaa. f4. /// /// - returns: Ccc. /// Ddd. /// /// - returns: Eee. /// Fff. func f4() {} // CHECK: {{.*}}DocCommentAsXML=[f4()s:FC14swift_ide_test15ParamAndReturns2f4FT_T_func f4()Aaa. f4.Eee. Fff.] } @objc class OrderedList { // CHECK: {{.*}}DocCommentAsXML=none /// 1. Aaa. /// /// 2. Bbb. /// Ccc. func f0() {} // CHECK: {{.*}}DocCommentAsXML=[f0()s:FC14swift_ide_test11OrderedList2f0FT_T_func f0()Aaa.Bbb. Ccc.] } @objc class ParameterOutline{ // CHECK: {{.*}}DocCommentAsXML=none /// - Parameters: /// - x: A number /// - y: A number /// /// - PARAMETERS: /// - z: A number func f0(x: Int, y: Int, z: Int) {} // CHECK: {{.*}}DocCommentAsXML=[f0(_:y:z:)s:FC14swift_ide_test16ParameterOutline2f0FTSi1ySi1zSi_T_func f0(x: Int, y: Int, z: Int)xinA numberyinA numberzinA number] // CHECK: {{.*}}DocCommentAsXML=none // CHECK: {{.*}}DocCommentAsXML=none // CHECK: {{.*}}DocCommentAsXML=none } @objc class ParameterOutlineMiddle { // CHECK: {{.*}}DocCommentAsXML=none /// - This line should remain. /// - Parameters: /// - x: A number /// - y: A number /// - This line should also remain. /// - parameter z: A number func f0(x: Int, y: Int, z: Int) {} // CHECK: {{.*}}DocCommentAsXML=[f0(_:y:z:)s:FC14swift_ide_test22ParameterOutlineMiddle2f0FTSi1ySi1zSi_T_func f0(x: Int, y: Int, z: Int)xinA numberyinA numberzinA numberThis line should remain.This line should also remain.] // CHECK: {{.*}}DocCommentAsXML=none // CHECK: {{.*}}DocCommentAsXML=none // CHECK: {{.*}}DocCommentAsXML=none } @objc class ReferenceLink { // CHECK: {{.*}}DocCommentAsXML=none /// This is [a reference link] [1]. /// /// [1]: http://developer.apple.com/ } @objc class Returns { // CHECK: {{.*}}DocCommentAsXML=none /// - returns: A number func f0() -> Int { return 0 } // CHECK: {{.*}}DocCommentAsXML=[f0()s:FC14swift_ide_test7Returns2f0FT_Sifunc f0() -> IntA number] } @objc class SeparateParameters { // CHECK: {{.*}}DocCommentAsXML=none /// - Parameter x: A number func f0(x: Int, y: Int) {} // CHECK: DocCommentAsXML=[f0(_:y:)s:FC14swift_ide_test18SeparateParameters2f0FTSi1ySi_T_func f0(x: Int, y: Int)xinA number] // CHECK: {{.*}}DocCommentAsXML=none // CHECK: {{.*}}DocCommentAsXML=none } @objc class SetextHeaders { // CHECK: {{.*}}DocCommentAsXML=none /// # LEVEL ONE /// /// ## LEVEL TWO /// /// ### LEVEL THREE /// /// #### LEVEL FOUR /// /// ##### LEVEL FIVE /// /// ##### LEVEL SIX func f0() {} // CHECK: {{.*}}DocCommentAsXML=[f0()s:FC14swift_ide_test13SetextHeaders2f0FT_T_func f0()]]>LEVEL ONE]]>]]>LEVEL TWO]]>]]>LEVEL THREE]]>]]>LEVEL FOUR]]>]]>LEVEL FIVE]]>]]>LEVEL SIX]]>] } @objc class StrongEmphasis { // CHECK: {{.*}}DocCommentAsXML=none /// Aaa **bbb** ccc. /// Aaa __bbb__ ccc. func f0() {} // CHECK: {{.*}}DocCommentAsXML=[f0()s:FC14swift_ide_test14StrongEmphasis2f0FT_T_func f0()Aaa bbb ccc. Aaa bbb ccc.] } @objc class UnorderedList { // CHECK: {{.*}}DocCommentAsXML=none /// * Aaa. /// /// * Bbb. /// Ccc. /// /// - Ddd. /// - Eee. /// - Fff. func f0() {} // CHECK: {{.*}}DocCommentAsXML=[f0()s:FC14swift_ide_test13UnorderedList2f0FT_T_func f0()Aaa.Bbb. Ccc.Ddd.Eee.Fff.] } @objc class IndentedBlockComment { // CHECK: {{.*}}DocCommentAsXML=none /** Brief. First paragraph line. Second paragraph line. Now for a code sample: var x = 1 // var y = 2 var z = 3 */ func f1() {} // CHECK: DocCommentAsXML=[f1()s:FC14swift_ide_test20IndentedBlockComment2f1FT_T_func f1()Brief.First paragraph line. Second paragraph line.Now for a code sample:] /** Hugely indented brief. First paragraph line. Second paragraph line. Now for a code sample: var x = 1 // var y = 2 var z = 3 */ func f2() {} // CHECK: {{.*}}DocCommentAsXML=[f2()s:FC14swift_ide_test20IndentedBlockComment2f2FT_T_func f2()Hugely indented brief.First paragraph line. Second paragraph line.Now for a code sample:] } @objc class MultiLineBrief { // CHECK: {{.*}}DocCommentAsXML=none /// Brief first line. /// Brief after softbreak. /// /// Some paragraph text. func f0() {} // CHECK: {{.*}}DocCommentAsXML=[f0()s:FC14swift_ide_test14MultiLineBrief2f0FT_T_func f0()Brief first line. Brief after softbreak.Some paragraph text.] } /// Brief. /// /// ``` /// thisIsASwiftCodeExample() /// ``` func codeListingWithDefaultLanguage() {} // CHECK: DocCommentAsXML=[codeListingWithDefaultLanguage()s:F14swift_ide_test30codeListingWithDefaultLanguageFT_T_func codeListingWithDefaultLanguage()Brief.] CommentXMLValid /// Brief. /// /// ```c++ /// Something::Something::create(); /// ``` func codeListingWithOtherLanguage() {} // CHECK: DocCommentAsXML=[codeListingWithOtherLanguage()s:F14swift_ide_test28codeListingWithOtherLanguageFT_T_func codeListingWithOtherLanguage()Brief.]