From ef753c8a1b9f02d9f6f026d555d628fbb207c574 Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Mon, 27 Feb 2017 18:30:30 +0300 Subject: Package platforms detected based on it's members, refactored multiplatform tests layout --- core/testdata/format/multiplatform/implied/foo.md | 24 ++++++++++++++++++++ core/testdata/format/multiplatform/implied/js.kt | 16 +++++++++++++ core/testdata/format/multiplatform/implied/jvm.kt | 16 +++++++++++++ core/testdata/format/multiplatform/js.kt | 7 ------ core/testdata/format/multiplatform/jvm.kt | 8 ------- core/testdata/format/multiplatform/merge/js.kt | 7 ++++++ core/testdata/format/multiplatform/merge/jvm.kt | 8 +++++++ .../multiplatform/merge/multiplatform.package.md | 8 +++++++ .../format/multiplatform/mergeMembers/foo.md | 26 ++++++++++++++++++++++ .../format/multiplatform/mergeMembers/js.kt | 16 +++++++++++++ .../format/multiplatform/mergeMembers/jvm.kt | 16 +++++++++++++ .../format/multiplatform/multiplatform.package.md | 9 -------- .../format/multiplatform/omitRedundant/foo.md | 22 ++++++++++++++++++ .../format/multiplatform/omitRedundant/js.kt | 2 ++ .../format/multiplatform/omitRedundant/jvm.kt | 11 +++++++++ .../packagePlatformsFromMembers/js.kt | 3 +++ .../packagePlatformsFromMembers/jvm.kt | 3 +++ .../multiplatform.index.md | 8 +++++++ core/testdata/format/multiplatform/simple/js.kt | 7 ++++++ core/testdata/format/multiplatform/simple/jvm.kt | 8 +++++++ .../multiplatform/simple/multiplatform.package.md | 9 ++++++++ core/testdata/format/multiplatformImplied/foo.md | 24 -------------------- core/testdata/format/multiplatformImplied/js.kt | 16 ------------- core/testdata/format/multiplatformImplied/jvm.kt | 16 ------------- core/testdata/format/multiplatformMerge/js.kt | 7 ------ core/testdata/format/multiplatformMerge/jvm.kt | 8 ------- .../multiplatformMerge/multiplatform.package.md | 8 ------- .../format/multiplatformMergeMembers/foo.md | 26 ---------------------- .../format/multiplatformMergeMembers/js.kt | 16 ------------- .../format/multiplatformMergeMembers/jvm.kt | 16 ------------- .../format/multiplatformOmitRedundant/foo.md | 22 ------------------ .../format/multiplatformOmitRedundant/js.kt | 2 -- .../format/multiplatformOmitRedundant/jvm.kt | 11 --------- 33 files changed, 210 insertions(+), 196 deletions(-) create mode 100644 core/testdata/format/multiplatform/implied/foo.md create mode 100644 core/testdata/format/multiplatform/implied/js.kt create mode 100644 core/testdata/format/multiplatform/implied/jvm.kt delete mode 100644 core/testdata/format/multiplatform/js.kt delete mode 100644 core/testdata/format/multiplatform/jvm.kt create mode 100644 core/testdata/format/multiplatform/merge/js.kt create mode 100644 core/testdata/format/multiplatform/merge/jvm.kt create mode 100644 core/testdata/format/multiplatform/merge/multiplatform.package.md create mode 100644 core/testdata/format/multiplatform/mergeMembers/foo.md create mode 100644 core/testdata/format/multiplatform/mergeMembers/js.kt create mode 100644 core/testdata/format/multiplatform/mergeMembers/jvm.kt delete mode 100644 core/testdata/format/multiplatform/multiplatform.package.md create mode 100644 core/testdata/format/multiplatform/omitRedundant/foo.md create mode 100644 core/testdata/format/multiplatform/omitRedundant/js.kt create mode 100644 core/testdata/format/multiplatform/omitRedundant/jvm.kt create mode 100644 core/testdata/format/multiplatform/packagePlatformsFromMembers/js.kt create mode 100644 core/testdata/format/multiplatform/packagePlatformsFromMembers/jvm.kt create mode 100644 core/testdata/format/multiplatform/packagePlatformsFromMembers/multiplatform.index.md create mode 100644 core/testdata/format/multiplatform/simple/js.kt create mode 100644 core/testdata/format/multiplatform/simple/jvm.kt create mode 100644 core/testdata/format/multiplatform/simple/multiplatform.package.md delete mode 100644 core/testdata/format/multiplatformImplied/foo.md delete mode 100644 core/testdata/format/multiplatformImplied/js.kt delete mode 100644 core/testdata/format/multiplatformImplied/jvm.kt delete mode 100644 core/testdata/format/multiplatformMerge/js.kt delete mode 100644 core/testdata/format/multiplatformMerge/jvm.kt delete mode 100644 core/testdata/format/multiplatformMerge/multiplatform.package.md delete mode 100644 core/testdata/format/multiplatformMergeMembers/foo.md delete mode 100644 core/testdata/format/multiplatformMergeMembers/js.kt delete mode 100644 core/testdata/format/multiplatformMergeMembers/jvm.kt delete mode 100644 core/testdata/format/multiplatformOmitRedundant/foo.md delete mode 100644 core/testdata/format/multiplatformOmitRedundant/js.kt delete mode 100644 core/testdata/format/multiplatformOmitRedundant/jvm.kt (limited to 'core/testdata') diff --git a/core/testdata/format/multiplatform/implied/foo.md b/core/testdata/format/multiplatform/implied/foo.md new file mode 100644 index 00000000..c615dd8e --- /dev/null +++ b/core/testdata/format/multiplatform/implied/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()`
This is a foo. | + +### Properties + +| [propJs](test/foo/-foo/prop-js)
(JS) | `val propJs: String` | +| [propJvm](test/foo/-foo/prop-jvm)
(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)
(JS) | `fun js(): Unit` | +| [jvm](test/foo/-foo/jvm)
(JVM) | `fun jvm(): Unit` | + diff --git a/core/testdata/format/multiplatform/implied/js.kt b/core/testdata/format/multiplatform/implied/js.kt new file mode 100644 index 00000000..dd2de5bc --- /dev/null +++ b/core/testdata/format/multiplatform/implied/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/multiplatform/implied/jvm.kt b/core/testdata/format/multiplatform/implied/jvm.kt new file mode 100644 index 00000000..8d73ce25 --- /dev/null +++ b/core/testdata/format/multiplatform/implied/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/multiplatform/js.kt b/core/testdata/format/multiplatform/js.kt deleted file mode 100644 index e6d66ffd..00000000 --- a/core/testdata/format/multiplatform/js.kt +++ /dev/null @@ -1,7 +0,0 @@ -package foo - -/** - * This is a bar. - */ -class Bar { -} diff --git a/core/testdata/format/multiplatform/jvm.kt b/core/testdata/format/multiplatform/jvm.kt deleted file mode 100644 index cb77273f..00000000 --- a/core/testdata/format/multiplatform/jvm.kt +++ /dev/null @@ -1,8 +0,0 @@ -package foo - -/** - * This is a foo. - */ -class Foo { - -} diff --git a/core/testdata/format/multiplatform/merge/js.kt b/core/testdata/format/multiplatform/merge/js.kt new file mode 100644 index 00000000..bbf1dd7c --- /dev/null +++ b/core/testdata/format/multiplatform/merge/js.kt @@ -0,0 +1,7 @@ +package foo + +/** + * This is a foo. + */ +class Foo { +} diff --git a/core/testdata/format/multiplatform/merge/jvm.kt b/core/testdata/format/multiplatform/merge/jvm.kt new file mode 100644 index 00000000..cb77273f --- /dev/null +++ b/core/testdata/format/multiplatform/merge/jvm.kt @@ -0,0 +1,8 @@ +package foo + +/** + * This is a foo. + */ +class Foo { + +} diff --git a/core/testdata/format/multiplatform/merge/multiplatform.package.md b/core/testdata/format/multiplatform/merge/multiplatform.package.md new file mode 100644 index 00000000..a423f603 --- /dev/null +++ b/core/testdata/format/multiplatform/merge/multiplatform.package.md @@ -0,0 +1,8 @@ +[test](test/index) / [foo](test/foo/index) + +## Package foo + +### Types + +| [Foo](test/foo/-foo/index)
(JVM, JS) | `class Foo`
This is a foo. | + diff --git a/core/testdata/format/multiplatform/mergeMembers/foo.md b/core/testdata/format/multiplatform/mergeMembers/foo.md new file mode 100644 index 00000000..7490c878 --- /dev/null +++ b/core/testdata/format/multiplatform/mergeMembers/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()`
This is a foo. | + +### Properties + +| [propJs](test/foo/-foo/prop-js)
(JS) | `val propJs: String` | +| [propJvm](test/foo/-foo/prop-jvm)
(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)
(JS) | `fun js(): Unit` | +| [jvm](test/foo/-foo/jvm)
(JVM) | `fun jvm(): Unit` | + diff --git a/core/testdata/format/multiplatform/mergeMembers/js.kt b/core/testdata/format/multiplatform/mergeMembers/js.kt new file mode 100644 index 00000000..dd2de5bc --- /dev/null +++ b/core/testdata/format/multiplatform/mergeMembers/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/multiplatform/mergeMembers/jvm.kt b/core/testdata/format/multiplatform/mergeMembers/jvm.kt new file mode 100644 index 00000000..8d73ce25 --- /dev/null +++ b/core/testdata/format/multiplatform/mergeMembers/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/multiplatform/multiplatform.package.md b/core/testdata/format/multiplatform/multiplatform.package.md deleted file mode 100644 index 3574942c..00000000 --- a/core/testdata/format/multiplatform/multiplatform.package.md +++ /dev/null @@ -1,9 +0,0 @@ -[test](test/index) / [foo](test/foo/index) - -## Package foo - -### Types - -| [Bar](test/foo/-bar/index)
(JS) | `class Bar`
This is a bar. | -| [Foo](test/foo/-foo/index)
(JVM) | `class Foo`
This is a foo. | - diff --git a/core/testdata/format/multiplatform/omitRedundant/foo.md b/core/testdata/format/multiplatform/omitRedundant/foo.md new file mode 100644 index 00000000..088ced2c --- /dev/null +++ b/core/testdata/format/multiplatform/omitRedundant/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()`
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/multiplatform/omitRedundant/js.kt b/core/testdata/format/multiplatform/omitRedundant/js.kt new file mode 100644 index 00000000..d1b1429c --- /dev/null +++ b/core/testdata/format/multiplatform/omitRedundant/js.kt @@ -0,0 +1,2 @@ +package foo + diff --git a/core/testdata/format/multiplatform/omitRedundant/jvm.kt b/core/testdata/format/multiplatform/omitRedundant/jvm.kt new file mode 100644 index 00000000..35e3c08d --- /dev/null +++ b/core/testdata/format/multiplatform/omitRedundant/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/multiplatform/packagePlatformsFromMembers/js.kt b/core/testdata/format/multiplatform/packagePlatformsFromMembers/js.kt new file mode 100644 index 00000000..86d09289 --- /dev/null +++ b/core/testdata/format/multiplatform/packagePlatformsFromMembers/js.kt @@ -0,0 +1,3 @@ +package foo.bar + +fun buz() {} diff --git a/core/testdata/format/multiplatform/packagePlatformsFromMembers/jvm.kt b/core/testdata/format/multiplatform/packagePlatformsFromMembers/jvm.kt new file mode 100644 index 00000000..86d09289 --- /dev/null +++ b/core/testdata/format/multiplatform/packagePlatformsFromMembers/jvm.kt @@ -0,0 +1,3 @@ +package foo.bar + +fun buz() {} diff --git a/core/testdata/format/multiplatform/packagePlatformsFromMembers/multiplatform.index.md b/core/testdata/format/multiplatform/packagePlatformsFromMembers/multiplatform.index.md new file mode 100644 index 00000000..0440bb1d --- /dev/null +++ b/core/testdata/format/multiplatform/packagePlatformsFromMembers/multiplatform.index.md @@ -0,0 +1,8 @@ +[test](test/index) / [foo.bar](test/foo.bar/index) + +## Package foo.bar + +### Functions + +| [buz](test/foo.bar/buz)
(JVM, JS) | `fun buz(): Unit` | + diff --git a/core/testdata/format/multiplatform/simple/js.kt b/core/testdata/format/multiplatform/simple/js.kt new file mode 100644 index 00000000..e6d66ffd --- /dev/null +++ b/core/testdata/format/multiplatform/simple/js.kt @@ -0,0 +1,7 @@ +package foo + +/** + * This is a bar. + */ +class Bar { +} diff --git a/core/testdata/format/multiplatform/simple/jvm.kt b/core/testdata/format/multiplatform/simple/jvm.kt new file mode 100644 index 00000000..cb77273f --- /dev/null +++ b/core/testdata/format/multiplatform/simple/jvm.kt @@ -0,0 +1,8 @@ +package foo + +/** + * This is a foo. + */ +class Foo { + +} diff --git a/core/testdata/format/multiplatform/simple/multiplatform.package.md b/core/testdata/format/multiplatform/simple/multiplatform.package.md new file mode 100644 index 00000000..3574942c --- /dev/null +++ b/core/testdata/format/multiplatform/simple/multiplatform.package.md @@ -0,0 +1,9 @@ +[test](test/index) / [foo](test/foo/index) + +## Package foo + +### Types + +| [Bar](test/foo/-bar/index)
(JS) | `class Bar`
This is a bar. | +| [Foo](test/foo/-foo/index)
(JVM) | `class Foo`
This is a foo. | + diff --git a/core/testdata/format/multiplatformImplied/foo.md b/core/testdata/format/multiplatformImplied/foo.md deleted file mode 100644 index c615dd8e..00000000 --- a/core/testdata/format/multiplatformImplied/foo.md +++ /dev/null @@ -1,24 +0,0 @@ -[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()`
This is a foo. | - -### Properties - -| [propJs](test/foo/-foo/prop-js)
(JS) | `val propJs: String` | -| [propJvm](test/foo/-foo/prop-jvm)
(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)
(JS) | `fun js(): Unit` | -| [jvm](test/foo/-foo/jvm)
(JVM) | `fun jvm(): Unit` | - diff --git a/core/testdata/format/multiplatformImplied/js.kt b/core/testdata/format/multiplatformImplied/js.kt deleted file mode 100644 index dd2de5bc..00000000 --- a/core/testdata/format/multiplatformImplied/js.kt +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 8d73ce25..00000000 --- a/core/testdata/format/multiplatformImplied/jvm.kt +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index bbf1dd7c..00000000 --- a/core/testdata/format/multiplatformMerge/js.kt +++ /dev/null @@ -1,7 +0,0 @@ -package foo - -/** - * This is a foo. - */ -class Foo { -} diff --git a/core/testdata/format/multiplatformMerge/jvm.kt b/core/testdata/format/multiplatformMerge/jvm.kt deleted file mode 100644 index cb77273f..00000000 --- a/core/testdata/format/multiplatformMerge/jvm.kt +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index a423f603..00000000 --- a/core/testdata/format/multiplatformMerge/multiplatform.package.md +++ /dev/null @@ -1,8 +0,0 @@ -[test](test/index) / [foo](test/foo/index) - -## Package foo - -### Types - -| [Foo](test/foo/-foo/index)
(JVM, JS) | `class Foo`
This is a foo. | - diff --git a/core/testdata/format/multiplatformMergeMembers/foo.md b/core/testdata/format/multiplatformMergeMembers/foo.md deleted file mode 100644 index 7490c878..00000000 --- a/core/testdata/format/multiplatformMergeMembers/foo.md +++ /dev/null @@ -1,26 +0,0 @@ -[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()`
This is a foo. | - -### Properties - -| [propJs](test/foo/-foo/prop-js)
(JS) | `val propJs: String` | -| [propJvm](test/foo/-foo/prop-jvm)
(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)
(JS) | `fun js(): Unit` | -| [jvm](test/foo/-foo/jvm)
(JVM) | `fun jvm(): Unit` | - diff --git a/core/testdata/format/multiplatformMergeMembers/js.kt b/core/testdata/format/multiplatformMergeMembers/js.kt deleted file mode 100644 index dd2de5bc..00000000 --- a/core/testdata/format/multiplatformMergeMembers/js.kt +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 8d73ce25..00000000 --- a/core/testdata/format/multiplatformMergeMembers/jvm.kt +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 088ced2c..00000000 --- a/core/testdata/format/multiplatformOmitRedundant/foo.md +++ /dev/null @@ -1,22 +0,0 @@ -[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()`
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 deleted file mode 100644 index d1b1429c..00000000 --- a/core/testdata/format/multiplatformOmitRedundant/js.kt +++ /dev/null @@ -1,2 +0,0 @@ -package foo - diff --git a/core/testdata/format/multiplatformOmitRedundant/jvm.kt b/core/testdata/format/multiplatformOmitRedundant/jvm.kt deleted file mode 100644 index 35e3c08d..00000000 --- a/core/testdata/format/multiplatformOmitRedundant/jvm.kt +++ /dev/null @@ -1,11 +0,0 @@ -package foo - -/** - * This is a foo. - */ -class Foo { - fun jvm() { - } - - val propJvm = "abc" -} -- cgit