[K2/N] Add ObjCExport test for kdoc strings
^KT-56090 Merge-request: KT-MR-9926 Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
d24eaf13b5
commit
79599ab69e
@@ -0,0 +1 @@
|
||||
EXPORT_KDOC
|
||||
@@ -0,0 +1,14 @@
|
||||
* `Summary class` [KDocExport]. // EXPORT_KDOC
|
||||
* @property xyzzy Doc for property xyzzy // EXPORT_KDOC
|
||||
* @property zzz See below. // EXPORT_KDOC
|
||||
/** Non-primary ctor KDoc: // EXPORT_KDOC */
|
||||
/** @property xyzzy KDoc for foo? // EXPORT_KDOC */
|
||||
* @param xyzzy is documented. // EXPORT_KDOC
|
||||
* This is multi-line KDoc. See a blank line above. // EXPORT_KDOC
|
||||
/** @property foo KDoc for yxxyz? // EXPORT_KDOC */
|
||||
* Kdoc for a property // EXPORT_KDOC
|
||||
* Useless function [whatever] // EXPORT_KDOC
|
||||
* This kdoc has some additional formatting. // EXPORT_KDOC
|
||||
* @param a keep intact and return // EXPORT_KDOC
|
||||
* @return value of [a] // EXPORT_KDOC
|
||||
* Check for additional comment (note) below // EXPORT_KDOC
|
||||
@@ -0,0 +1,54 @@
|
||||
// KT-56090: [K2/N] Emit DocString klib extensions for ObjCExport
|
||||
// MUTED_WHEN: K2
|
||||
/*
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package kdocExport
|
||||
|
||||
/**
|
||||
* `Summary class` [KDocExport]. // EXPORT_KDOC
|
||||
*
|
||||
* @property xyzzy Doc for property xyzzy // EXPORT_KDOC
|
||||
* @property zzz See below. // EXPORT_KDOC
|
||||
*/
|
||||
|
||||
// Expected: this comment shall not affect KDoc (i.e. kdoc above is still OK)
|
||||
class KDocExport() {
|
||||
/**
|
||||
* @param xyzzy is documented. // EXPORT_KDOC
|
||||
*
|
||||
* This is multi-line KDoc. See a blank line above. // EXPORT_KDOC
|
||||
*/
|
||||
val xyzzy: String = "String example"
|
||||
|
||||
/** Non-primary ctor KDoc: // EXPORT_KDOC */
|
||||
constructor(name: String) : this() {
|
||||
println(name)
|
||||
}
|
||||
|
||||
/** @property xyzzy KDoc for foo? // EXPORT_KDOC */
|
||||
val foo = "foo"
|
||||
/** @property foo KDoc for yxxyz? // EXPORT_KDOC */
|
||||
var yxxyz = 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Useless function [whatever] // EXPORT_KDOC
|
||||
*
|
||||
* This kdoc has some additional formatting. // EXPORT_KDOC
|
||||
* @param a keep intact and return // EXPORT_KDOC
|
||||
* @return value of [a] // EXPORT_KDOC
|
||||
* Check for additional comment (note) below // EXPORT_KDOC
|
||||
*/
|
||||
fun whatever(a:String) = a
|
||||
|
||||
public abstract class SomeClassWithProperty
|
||||
{
|
||||
/**
|
||||
* Kdoc for a property // EXPORT_KDOC
|
||||
*/
|
||||
public abstract val heavyFormattedKDocFoo: SomeClassWithProperty
|
||||
}
|
||||
Reference in New Issue
Block a user