aboutsummaryrefslogtreecommitdiff
path: root/test/src/FunctionTest.kt
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/FunctionTest.kt')
-rw-r--r--test/src/FunctionTest.kt34
1 files changed, 18 insertions, 16 deletions
diff --git a/test/src/FunctionTest.kt b/test/src/FunctionTest.kt
index e8afe97b..2c0955d1 100644
--- a/test/src/FunctionTest.kt
+++ b/test/src/FunctionTest.kt
@@ -8,30 +8,32 @@ import com.jetbrains.dokka.*
public class FunctionTest {
Test fun function() {
verifyModel("test/data/functions/function.kt") { model ->
- val item = model.nodes.single().members.single()
- assertEquals(DocumentationNodeKind.Function, item.kind)
- assertEquals("fn", item.name)
- assertEquals("Function fn", item.doc)
- assertTrue(item.details.none())
- assertTrue(item.members.none())
- assertTrue(item.links.none())
+ with(model.nodes.single().members.single()) {
+ assertEquals(DocumentationNodeKind.Function, kind)
+ assertEquals("fn", name)
+ assertEquals("Function fn", doc)
+ assertTrue(details.none())
+ assertTrue(members.none())
+ assertTrue(links.none())
+ }
}
}
Test fun functionWithParams() {
verifyModel("test/data/functions/functionWithParams.kt") { model ->
- val item = model.nodes.single().members.single()
- assertEquals(DocumentationNodeKind.Function, item.kind)
- assertEquals("function", item.name)
- assertEquals("""Multiline
+ with(model.nodes.single().members.single()) {
+ assertEquals(DocumentationNodeKind.Function, kind)
+ assertEquals("function", name)
+ assertEquals("""Multiline
Function
Documentation"""
- , item.doc)
- assertEquals("x", item.details.single().name)
- assertEquals(DocumentationNodeKind.Parameter, item.details.single().kind)
+ , doc)
+ assertEquals("x", details.single().name)
+ assertEquals(DocumentationNodeKind.Parameter, details.single().kind)
- assertTrue(item.members.none())
- assertTrue(item.links.none())
+ assertTrue(members.none())
+ assertTrue(links.none())
+ }
}
}
} \ No newline at end of file