diff options
Diffstat (limited to 'core/testdata')
32 files changed, 324 insertions, 0 deletions
diff --git a/core/testdata/classes/sinceKotlin.kt b/core/testdata/classes/sinceKotlin.kt new file mode 100644 index 00000000..1025cf0d --- /dev/null +++ b/core/testdata/classes/sinceKotlin.kt @@ -0,0 +1,5 @@ +/** + * Useful + */ +@SinceKotlin("1.1") +class `Since1.1`
\ No newline at end of file diff --git a/core/testdata/format/dynamicExtension.kt b/core/testdata/format/dynamicExtension.kt new file mode 100644 index 00000000..5c83bf22 --- /dev/null +++ b/core/testdata/format/dynamicExtension.kt @@ -0,0 +1,3 @@ +class Foo + +fun dynamic.bar() {} diff --git a/core/testdata/format/dynamicExtension.md b/core/testdata/format/dynamicExtension.md new file mode 100644 index 00000000..2fd928f6 --- /dev/null +++ b/core/testdata/format/dynamicExtension.md @@ -0,0 +1,10 @@ +[test](test/index) / [Foo](test/-foo/index) + +# Foo + +`class Foo` + +### Constructors + +| [<init>](test/-foo/-init-) | `Foo()` | + diff --git a/core/testdata/format/dynamicType.kt b/core/testdata/format/dynamicType.kt new file mode 100644 index 00000000..9d557ac0 --- /dev/null +++ b/core/testdata/format/dynamicType.kt @@ -0,0 +1,2 @@ +fun foo(): dynamic = "" + diff --git a/core/testdata/format/dynamicType.md b/core/testdata/format/dynamicType.md new file mode 100644 index 00000000..a3d6696b --- /dev/null +++ b/core/testdata/format/dynamicType.md @@ -0,0 +1,5 @@ +[test](test/index) / [foo](test/foo) + +# foo + +`fun foo(): dynamic`
\ No newline at end of file diff --git a/core/testdata/format/memberExtension.kt b/core/testdata/format/memberExtension.kt new file mode 100644 index 00000000..955794d1 --- /dev/null +++ b/core/testdata/format/memberExtension.kt @@ -0,0 +1,8 @@ +open class X + +class Foo : X + +class Bar { + fun X.y() = "" + fun Foo.x() = "" +} diff --git a/core/testdata/format/memberExtension.md b/core/testdata/format/memberExtension.md new file mode 100644 index 00000000..b9db4e3d --- /dev/null +++ b/core/testdata/format/memberExtension.md @@ -0,0 +1,10 @@ +[test](test/index) / [Foo](test/-foo/index) + +# Foo + +`class Foo : `[`X`](test/-x/index) + +### Constructors + +| [<init>](test/-foo/-init-) | `Foo()` | + diff --git a/core/testdata/format/multiplatform/js.kt b/core/testdata/format/multiplatform/js.kt new file mode 100644 index 00000000..e6d66ffd --- /dev/null +++ b/core/testdata/format/multiplatform/js.kt @@ -0,0 +1,7 @@ +package foo + +/** + * This is a bar. + */ +class Bar { +} diff --git a/core/testdata/format/multiplatform/jvm.kt b/core/testdata/format/multiplatform/jvm.kt new file mode 100644 index 00000000..cb77273f --- /dev/null +++ b/core/testdata/format/multiplatform/jvm.kt @@ -0,0 +1,8 @@ +package foo + +/** + * This is a foo. + */ +class Foo { + +} diff --git a/core/testdata/format/multiplatform/multiplatform.package.md b/core/testdata/format/multiplatform/multiplatform.package.md new file mode 100644 index 00000000..3574942c --- /dev/null +++ b/core/testdata/format/multiplatform/multiplatform.package.md @@ -0,0 +1,9 @@ +[test](test/index) / [foo](test/foo/index) + +## Package foo + +### Types + +| [Bar](test/foo/-bar/index)<br>(JS) | `class Bar`<br>This is a bar. | +| [Foo](test/foo/-foo/index)<br>(JVM) | `class Foo`<br>This is a foo. | + diff --git a/core/testdata/format/multiplatformImplied/foo.md b/core/testdata/format/multiplatformImplied/foo.md new file mode 100644 index 00000000..c615dd8e --- /dev/null +++ b/core/testdata/format/multiplatformImplied/foo.md @@ -0,0 +1,24 @@ +[test](test/index) / [foo](test/foo/index) / [Foo](test/foo/-foo/index) + +# Foo + +`class Foo` + +This is a foo. + +### Constructors + +| [<init>](test/foo/-foo/-init-) | `Foo()`<br>This is a foo. | + +### Properties + +| [propJs](test/foo/-foo/prop-js)<br>(JS) | `val propJs: String` | +| [propJvm](test/foo/-foo/prop-jvm)<br>(JVM) | `val propJvm: String` | +| [propJvmAndJs](test/foo/-foo/prop-jvm-and-js) | `val propJvmAndJs: Int` | + +### Functions + +| [bothJvmAndJs](test/foo/-foo/both-jvm-and-js) | `fun bothJvmAndJs(): Unit` | +| [js](test/foo/-foo/js)<br>(JS) | `fun js(): Unit` | +| [jvm](test/foo/-foo/jvm)<br>(JVM) | `fun jvm(): Unit` | + diff --git a/core/testdata/format/multiplatformImplied/js.kt b/core/testdata/format/multiplatformImplied/js.kt new file mode 100644 index 00000000..dd2de5bc --- /dev/null +++ b/core/testdata/format/multiplatformImplied/js.kt @@ -0,0 +1,16 @@ +package foo + +/** + * This is a foo. + */ +class Foo { + fun bothJvmAndJs() { + } + + fun js() { + } + + val propJvmAndJs = 0 + + val propJs = "abc" +} diff --git a/core/testdata/format/multiplatformImplied/jvm.kt b/core/testdata/format/multiplatformImplied/jvm.kt new file mode 100644 index 00000000..8d73ce25 --- /dev/null +++ b/core/testdata/format/multiplatformImplied/jvm.kt @@ -0,0 +1,16 @@ +package foo + +/** + * This is a foo. + */ +class Foo { + fun bothJvmAndJs() { + } + + fun jvm() { + } + + val propJvmAndJs = 0 + + val propJvm = "abc" +} diff --git a/core/testdata/format/multiplatformMerge/js.kt b/core/testdata/format/multiplatformMerge/js.kt new file mode 100644 index 00000000..bbf1dd7c --- /dev/null +++ b/core/testdata/format/multiplatformMerge/js.kt @@ -0,0 +1,7 @@ +package foo + +/** + * This is a foo. + */ +class Foo { +} diff --git a/core/testdata/format/multiplatformMerge/jvm.kt b/core/testdata/format/multiplatformMerge/jvm.kt new file mode 100644 index 00000000..cb77273f --- /dev/null +++ b/core/testdata/format/multiplatformMerge/jvm.kt @@ -0,0 +1,8 @@ +package foo + +/** + * This is a foo. + */ +class Foo { + +} diff --git a/core/testdata/format/multiplatformMerge/multiplatform.package.md b/core/testdata/format/multiplatformMerge/multiplatform.package.md new file mode 100644 index 00000000..a423f603 --- /dev/null +++ b/core/testdata/format/multiplatformMerge/multiplatform.package.md @@ -0,0 +1,8 @@ +[test](test/index) / [foo](test/foo/index) + +## Package foo + +### Types + +| [Foo](test/foo/-foo/index)<br>(JVM, JS) | `class Foo`<br>This is a foo. | + diff --git a/core/testdata/format/multiplatformMergeMembers/foo.md b/core/testdata/format/multiplatformMergeMembers/foo.md new file mode 100644 index 00000000..7490c878 --- /dev/null +++ b/core/testdata/format/multiplatformMergeMembers/foo.md @@ -0,0 +1,26 @@ +[test](test/index) / [foo](test/foo/index) / [Foo](test/foo/-foo/index) + +# Foo + +`class Foo` + +**Platform and version requirements:** JVM, JS + +This is a foo. + +### Constructors + +| [<init>](test/foo/-foo/-init-) | `Foo()`<br>This is a foo. | + +### Properties + +| [propJs](test/foo/-foo/prop-js)<br>(JS) | `val propJs: String` | +| [propJvm](test/foo/-foo/prop-jvm)<br>(JVM) | `val propJvm: String` | +| [propJvmAndJs](test/foo/-foo/prop-jvm-and-js) | `val propJvmAndJs: Int` | + +### Functions + +| [bothJvmAndJs](test/foo/-foo/both-jvm-and-js) | `fun bothJvmAndJs(): Unit` | +| [js](test/foo/-foo/js)<br>(JS) | `fun js(): Unit` | +| [jvm](test/foo/-foo/jvm)<br>(JVM) | `fun jvm(): Unit` | + diff --git a/core/testdata/format/multiplatformMergeMembers/js.kt b/core/testdata/format/multiplatformMergeMembers/js.kt new file mode 100644 index 00000000..dd2de5bc --- /dev/null +++ b/core/testdata/format/multiplatformMergeMembers/js.kt @@ -0,0 +1,16 @@ +package foo + +/** + * This is a foo. + */ +class Foo { + fun bothJvmAndJs() { + } + + fun js() { + } + + val propJvmAndJs = 0 + + val propJs = "abc" +} diff --git a/core/testdata/format/multiplatformMergeMembers/jvm.kt b/core/testdata/format/multiplatformMergeMembers/jvm.kt new file mode 100644 index 00000000..8d73ce25 --- /dev/null +++ b/core/testdata/format/multiplatformMergeMembers/jvm.kt @@ -0,0 +1,16 @@ +package foo + +/** + * This is a foo. + */ +class Foo { + fun bothJvmAndJs() { + } + + fun jvm() { + } + + val propJvmAndJs = 0 + + val propJvm = "abc" +} diff --git a/core/testdata/format/multiplatformOmitRedundant/foo.md b/core/testdata/format/multiplatformOmitRedundant/foo.md new file mode 100644 index 00000000..088ced2c --- /dev/null +++ b/core/testdata/format/multiplatformOmitRedundant/foo.md @@ -0,0 +1,22 @@ +[test](test/index) / [foo](test/foo/index) / [Foo](test/foo/-foo/index) + +# Foo + +`class Foo` + +**Platform and version requirements:** JVM + +This is a foo. + +### Constructors + +| [<init>](test/foo/-foo/-init-) | `Foo()`<br>This is a foo. | + +### Properties + +| [propJvm](test/foo/-foo/prop-jvm) | `val propJvm: String` | + +### Functions + +| [jvm](test/foo/-foo/jvm) | `fun jvm(): Unit` | + diff --git a/core/testdata/format/multiplatformOmitRedundant/js.kt b/core/testdata/format/multiplatformOmitRedundant/js.kt new file mode 100644 index 00000000..d1b1429c --- /dev/null +++ b/core/testdata/format/multiplatformOmitRedundant/js.kt @@ -0,0 +1,2 @@ +package foo + diff --git a/core/testdata/format/multiplatformOmitRedundant/jvm.kt b/core/testdata/format/multiplatformOmitRedundant/jvm.kt new file mode 100644 index 00000000..35e3c08d --- /dev/null +++ b/core/testdata/format/multiplatformOmitRedundant/jvm.kt @@ -0,0 +1,11 @@ +package foo + +/** + * This is a foo. + */ +class Foo { + fun jvm() { + } + + val propJvm = "abc" +} diff --git a/core/testdata/format/sinceKotlin.html b/core/testdata/format/sinceKotlin.html new file mode 100644 index 00000000..eef5ca66 --- /dev/null +++ b/core/testdata/format/sinceKotlin.html @@ -0,0 +1,27 @@ +<HTML> +<HEAD> + <meta charset="UTF-8"> + <title>Since1.1 - test</title> +</HEAD> +<BODY> +<a href="test/index">test</a> / <a href="test/-since1.1/index">Since1.1</a><br/> +<br/> +<h1>Since1.1</h1> +<code><span class="keyword">class </span><span class="identifier">Since1.1</span></code> +<p><strong>Platform and version requirements:</strong> Kotlin 1.1</p> +<p>Useful</p> +<h3>Constructors</h3> +<table> + <tbody> + <tr> + <td> + <a href="test/-since1.1/-init-"><init></a></td> + <td> + <code><span class="identifier">Since1.1</span><span class="symbol">(</span><span class="symbol">)</span></code> + <p>Useful</p> + </td> + </tr> + </tbody> +</table> +</BODY> +</HTML> diff --git a/core/testdata/format/sinceKotlin.kt b/core/testdata/format/sinceKotlin.kt new file mode 100644 index 00000000..1025cf0d --- /dev/null +++ b/core/testdata/format/sinceKotlin.kt @@ -0,0 +1,5 @@ +/** + * Useful + */ +@SinceKotlin("1.1") +class `Since1.1`
\ No newline at end of file diff --git a/core/testdata/format/sinceKotlin.md b/core/testdata/format/sinceKotlin.md new file mode 100644 index 00000000..a1abe5fd --- /dev/null +++ b/core/testdata/format/sinceKotlin.md @@ -0,0 +1,14 @@ +[test](test/index) / [Since1.1](test/-since1.1/index) + +# Since1.1 + +`class Since1.1` + +**Platform and version requirements:** Kotlin 1.1 + +Useful + +### Constructors + +| [<init>](test/-since1.1/-init-) | `Since1.1()`<br>Useful | + diff --git a/core/testdata/format/sinceKotlin.package.md b/core/testdata/format/sinceKotlin.package.md new file mode 100644 index 00000000..2af0c9ee --- /dev/null +++ b/core/testdata/format/sinceKotlin.package.md @@ -0,0 +1,8 @@ +[test](test/index) + +## Package <root> + +### Types + +| [Since1.1](test/-since1.1/index)<br>(Kotlin 1.1) | `class Since1.1`<br>Useful | + diff --git a/core/testdata/format/suspendParam.kt b/core/testdata/format/suspendParam.kt new file mode 100644 index 00000000..ea3f56f9 --- /dev/null +++ b/core/testdata/format/suspendParam.kt @@ -0,0 +1,3 @@ +fun takesSuspendParam(func: suspend () -> Unit) { + +}
\ No newline at end of file diff --git a/core/testdata/format/suspendParam.md b/core/testdata/format/suspendParam.md new file mode 100644 index 00000000..cf11f57b --- /dev/null +++ b/core/testdata/format/suspendParam.md @@ -0,0 +1,5 @@ +[test](test/index) / [takesSuspendParam](test/takes-suspend-param) + +# takesSuspendParam + +`fun takesSuspendParam(func: suspend () -> Unit): Unit`
\ No newline at end of file diff --git a/core/testdata/format/suspendParam.package.md b/core/testdata/format/suspendParam.package.md new file mode 100644 index 00000000..463ba356 --- /dev/null +++ b/core/testdata/format/suspendParam.package.md @@ -0,0 +1,8 @@ +[test](test/index) + +## Package <root> + +### Functions + +| [takesSuspendParam](test/takes-suspend-param) | `fun takesSuspendParam(func: suspend () -> Unit): Unit` | + diff --git a/core/testdata/functions/sinceKotlin.kt b/core/testdata/functions/sinceKotlin.kt new file mode 100644 index 00000000..cdcd3357 --- /dev/null +++ b/core/testdata/functions/sinceKotlin.kt @@ -0,0 +1,5 @@ +/** + * Quite useful [String] + */ +@SinceKotlin("1.1") +fun `availableSince1.1`(): String = "1.1 rulezz"
\ No newline at end of file diff --git a/core/testdata/properties/sinceKotlin.kt b/core/testdata/properties/sinceKotlin.kt new file mode 100644 index 00000000..e96f2349 --- /dev/null +++ b/core/testdata/properties/sinceKotlin.kt @@ -0,0 +1,5 @@ +/** + * Quite useful [String] + */ +@SinceKotlin("1.1") +val `availableSince1.1`: String = "1.1 rulezz"
\ No newline at end of file diff --git a/core/testdata/typealias/sinceKotlin.kt b/core/testdata/typealias/sinceKotlin.kt new file mode 100644 index 00000000..5b76f63a --- /dev/null +++ b/core/testdata/typealias/sinceKotlin.kt @@ -0,0 +1,5 @@ +/** + * Documentation + */ +@SinceKotlin("1.1") +typealias `Since 1.1` = String
\ No newline at end of file |