diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/data/functions/functionWithParams.kt | 2 | ||||
-rw-r--r-- | test/playground.kt | 5 | ||||
-rw-r--r-- | test/src/TestAPI.kt | 2 | ||||
-rw-r--r-- | test/src/model/FunctionTest.kt | 1 |
4 files changed, 7 insertions, 3 deletions
diff --git a/test/data/functions/functionWithParams.kt b/test/data/functions/functionWithParams.kt index 559f4f78..52cd0744 100644 --- a/test/data/functions/functionWithParams.kt +++ b/test/data/functions/functionWithParams.kt @@ -3,5 +3,5 @@ * Function * Documentation */ -fun function(x: Int) { +fun function(/** parameter */ x: Int) { }
\ No newline at end of file diff --git a/test/playground.kt b/test/playground.kt index 50a43dfd..455e56ff 100644 --- a/test/playground.kt +++ b/test/playground.kt @@ -1,5 +1,6 @@ // this file is not included in sources or tests, you can play with it for debug purposes // Console run configuration will analyse it and provide lots of debug output +package dokka.playground fun topLevelFunction() { } @@ -32,9 +33,11 @@ class ClassWithConstructor(val name: String) /** * This is data class with constructor and comment after doc + * $name Person's name + * $age Person's age */ // irrelevant comment -data class DataClass(val name: String, val age: Int) {} +data class Person(/** Doc at parameter */ val name: String, val age: Int) {} object Object { fun objectFunction() { diff --git a/test/src/TestAPI.kt b/test/src/TestAPI.kt index 65254bca..e5669569 100644 --- a/test/src/TestAPI.kt +++ b/test/src/TestAPI.kt @@ -28,7 +28,7 @@ public fun verifyModel(vararg files: String, verifier: (DocumentationModel) -> U } val result = environment.processFiles { context, file -> - context.createDocumentation(file) + context.createSourceModel(file) }.fold(DocumentationModel()) {(aggregate, item) -> aggregate.merge(item) } verifier(result) Disposer.dispose(environment) diff --git a/test/src/model/FunctionTest.kt b/test/src/model/FunctionTest.kt index 90b937de..528166e6 100644 --- a/test/src/model/FunctionTest.kt +++ b/test/src/model/FunctionTest.kt @@ -30,6 +30,7 @@ Documentation""" with(details.single()) { assertEquals("x", name) assertEquals(DocumentationNodeKind.Parameter, kind) + assertEquals("parameter", doc) assertTrue(details.none()) assertTrue(members.none()) assertTrue(links.none()) |