From 6166ddfeb6ee977a302d4cacc80dac23cc7e2baf Mon Sep 17 00:00:00 2001 From: Andrzej Ratajczak Date: Fri, 10 Apr 2020 16:59:25 +0200 Subject: Working tests for includes, sources and samples. Minor bugfixes --- .../test/resources/linkable/samples/jsMain/kotlin/JsClass.kt | 9 +++++++++ .../resources/linkable/samples/jsMain/resources/Samples.kt | 10 ++++++++++ .../test/resources/linkable/samples/jvmMain/kotlin/JvmClass.kt | 9 +++++++++ .../resources/linkable/samples/jvmMain/resources/Samples.kt | 10 ++++++++++ 4 files changed, 38 insertions(+) create mode 100644 plugins/base/src/test/resources/linkable/samples/jsMain/kotlin/JsClass.kt create mode 100644 plugins/base/src/test/resources/linkable/samples/jsMain/resources/Samples.kt create mode 100644 plugins/base/src/test/resources/linkable/samples/jvmMain/kotlin/JvmClass.kt create mode 100644 plugins/base/src/test/resources/linkable/samples/jvmMain/resources/Samples.kt (limited to 'plugins/base/src/test/resources/linkable/samples') diff --git a/plugins/base/src/test/resources/linkable/samples/jsMain/kotlin/JsClass.kt b/plugins/base/src/test/resources/linkable/samples/jsMain/kotlin/JsClass.kt new file mode 100644 index 00000000..b61ce704 --- /dev/null +++ b/plugins/base/src/test/resources/linkable/samples/jsMain/kotlin/JsClass.kt @@ -0,0 +1,9 @@ +package p2 + +class JsClass { + + /** + * @sample samples.SamplesJs.exampleUsage + */ + fun printWithExclamation(msg: String) = println(msg + "!") +} \ No newline at end of file diff --git a/plugins/base/src/test/resources/linkable/samples/jsMain/resources/Samples.kt b/plugins/base/src/test/resources/linkable/samples/jsMain/resources/Samples.kt new file mode 100644 index 00000000..55be0ad8 --- /dev/null +++ b/plugins/base/src/test/resources/linkable/samples/jsMain/resources/Samples.kt @@ -0,0 +1,10 @@ +package samples + +import p2.JsClass + +class SamplesJs { + + fun exampleUsage() { + JsClass().printWithExclamation("Hi, Js") + } +} \ No newline at end of file diff --git a/plugins/base/src/test/resources/linkable/samples/jvmMain/kotlin/JvmClass.kt b/plugins/base/src/test/resources/linkable/samples/jvmMain/kotlin/JvmClass.kt new file mode 100644 index 00000000..960184e6 --- /dev/null +++ b/plugins/base/src/test/resources/linkable/samples/jvmMain/kotlin/JvmClass.kt @@ -0,0 +1,9 @@ +package p2 + +class JvmClass { + + /** + * @sample samples.SamplesJvm.exampleUsage + */ + fun printWithExclamation(msg: String) = println(msg + "!") +} \ No newline at end of file diff --git a/plugins/base/src/test/resources/linkable/samples/jvmMain/resources/Samples.kt b/plugins/base/src/test/resources/linkable/samples/jvmMain/resources/Samples.kt new file mode 100644 index 00000000..69418fa9 --- /dev/null +++ b/plugins/base/src/test/resources/linkable/samples/jvmMain/resources/Samples.kt @@ -0,0 +1,10 @@ +package samples + +import p2.JvmClass + +class SamplesJvm { + + fun exampleUsage() { + JvmClass().printWithExclamation("Hi, Jvm") + } +} \ No newline at end of file -- cgit