diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/src/TestAPI.kt | 2 | ||||
-rw-r--r-- | test/src/model/ClassTest.kt | 24 | ||||
-rw-r--r-- | test/src/model/FunctionTest.kt | 22 | ||||
-rw-r--r-- | test/src/model/PackageTest.kt | 10 | ||||
-rw-r--r-- | test/src/model/PropertyTest.kt | 16 |
5 files changed, 37 insertions, 37 deletions
diff --git a/test/src/TestAPI.kt b/test/src/TestAPI.kt index 29a64366..12c85c77 100644 --- a/test/src/TestAPI.kt +++ b/test/src/TestAPI.kt @@ -28,7 +28,7 @@ public fun verifyModel(vararg files: String, verifier: (DocumentationModule) -> } val result = environment.processFiles { context, module, file -> - context.createDocumentationModel(module, file) + context.createDocumentationModule(module, file) }.reduce {(aggregate, item) -> aggregate.merge(item) } verifier(result) Disposer.dispose(environment) diff --git a/test/src/model/ClassTest.kt b/test/src/model/ClassTest.kt index 10eda003..47eeb2ce 100644 --- a/test/src/model/ClassTest.kt +++ b/test/src/model/ClassTest.kt @@ -8,7 +8,7 @@ public class ClassTest { Test fun emptyClass() { verifyModel("test/data/classes/emptyClass.kt") { model -> with(model.members.single().members.single()) { - assertEquals(DocumentationNodeKind.Class, kind) + assertEquals(DocumentationNode.Kind.Class, kind) assertEquals("Klass", name) assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) @@ -21,7 +21,7 @@ public class ClassTest { Test fun gnClass() { verifyModel("test/data/classes/emptyClass.kt") { model -> with(model.members.single().members.single()) { - assertEquals(DocumentationNodeKind.Class, kind) + assertEquals(DocumentationNode.Kind.Class, kind) assertEquals("Klass", name) assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) @@ -34,7 +34,7 @@ public class ClassTest { Test fun emptyObject() { verifyModel("test/data/classes/emptyObject.kt") { model -> with(model.members.single().members.single()) { - assertEquals(DocumentationNodeKind.Object, kind) + assertEquals(DocumentationNode.Kind.Object, kind) assertEquals("Obj", name) assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) @@ -47,7 +47,7 @@ public class ClassTest { Test fun classWithConstructor() { verifyModel("test/data/classes/classWithConstructor.kt") { model -> with (model.members.single().members.single()) { - assertEquals(DocumentationNodeKind.Class, kind) + assertEquals(DocumentationNode.Kind.Class, kind) assertEquals("Klass", name) assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) @@ -57,11 +57,11 @@ public class ClassTest { with(members.elementAt(0)) { assertEquals("<init>", name) assertEquals(DocumentationContent.Empty, doc) - assertEquals(DocumentationNodeKind.Constructor, kind) + assertEquals(DocumentationNode.Kind.Constructor, kind) assertEquals(1, details.count()) with(details.elementAt(0)) { assertEquals("name", name) - assertEquals(DocumentationNodeKind.Parameter, kind) + assertEquals(DocumentationNode.Kind.Parameter, kind) assertEquals(DocumentationContent.Empty, doc) assertEquals("String", details.single().name) assertTrue(links.none()) @@ -77,7 +77,7 @@ public class ClassTest { Test fun classWithFunction() { verifyModel("test/data/classes/classWithFunction.kt") { model -> with(model.members.single().members.single()) { - assertEquals(DocumentationNodeKind.Class, kind) + assertEquals(DocumentationNode.Kind.Class, kind) assertEquals("Klass", name) assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) @@ -87,7 +87,7 @@ public class ClassTest { with(members.elementAt(0)) { assertEquals("<init>", name) assertEquals(DocumentationContent.Empty, doc) - assertEquals(DocumentationNodeKind.Constructor, kind) + assertEquals(DocumentationNode.Kind.Constructor, kind) assertTrue(details.none()) assertTrue(links.none()) assertTrue(members.none()) @@ -95,7 +95,7 @@ public class ClassTest { with(members.elementAt(1)) { assertEquals("fn", name) assertEquals(DocumentationContent.Empty, doc) - assertEquals(DocumentationNodeKind.Function, kind) + assertEquals(DocumentationNode.Kind.Function, kind) assertEquals("Unit", details.single().name) assertTrue(links.none()) assertTrue(members.none()) @@ -107,7 +107,7 @@ public class ClassTest { Test fun classWithProperty() { verifyModel("test/data/classes/classWithProperty.kt") { model -> with(model.members.single().members.single()) { - assertEquals(DocumentationNodeKind.Class, kind) + assertEquals(DocumentationNode.Kind.Class, kind) assertEquals("Klass", name) assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) @@ -117,7 +117,7 @@ public class ClassTest { with(members.elementAt(0)) { assertEquals("<init>", name) assertEquals(DocumentationContent.Empty, doc) - assertEquals(DocumentationNodeKind.Constructor, kind) + assertEquals(DocumentationNode.Kind.Constructor, kind) assertTrue(details.none()) assertTrue(members.none()) assertTrue(links.none()) @@ -125,7 +125,7 @@ public class ClassTest { with(members.elementAt(1)) { assertEquals("name", name) assertEquals(DocumentationContent.Empty, doc) - assertEquals(DocumentationNodeKind.Property, kind) + assertEquals(DocumentationNode.Kind.Property, kind) assertEquals("String", details.single().name) assertTrue(members.none()) assertTrue(links.none()) diff --git a/test/src/model/FunctionTest.kt b/test/src/model/FunctionTest.kt index 5309ff89..e501d3c0 100644 --- a/test/src/model/FunctionTest.kt +++ b/test/src/model/FunctionTest.kt @@ -9,7 +9,7 @@ public class FunctionTest { verifyModel("test/data/functions/function.kt") { model -> with(model.members.single().members.single()) { assertEquals("fn", name) - assertEquals(DocumentationNodeKind.Function, kind) + assertEquals(DocumentationNode.Kind.Function, kind) assertEquals("Function fn", doc.summary) assertEquals("Unit", details.single().name) assertTrue(members.none()) @@ -22,14 +22,14 @@ public class FunctionTest { verifyModel("test/data/functions/functionWithReceiver.kt") { model -> with(model.members.single().members.single()) { assertEquals("fn", name) - assertEquals(DocumentationNodeKind.Function, kind) + assertEquals(DocumentationNode.Kind.Function, kind) assertEquals("Function with receiver", doc.summary) assertEquals("Unit", details.elementAt(0).name) assertEquals(2, details.count()) with(details.elementAt(1)) { assertEquals("<this>", name) - assertEquals(DocumentationNodeKind.Receiver, kind) + assertEquals(DocumentationNode.Kind.Receiver, kind) assertEquals(DocumentationContent.Empty, doc) assertEquals("String", details.single().name) assertTrue(members.none()) @@ -45,14 +45,14 @@ public class FunctionTest { verifyModel("test/data/functions/genericFunction.kt") { model -> with(model.members.single().members.single()) { assertEquals("generic", name) - assertEquals(DocumentationNodeKind.Function, kind) + assertEquals(DocumentationNode.Kind.Function, kind) assertEquals("generic function", doc.summary) assertEquals(2, details.count()) assertEquals("Unit", details.elementAt(0).name) with(details.elementAt(1)) { assertEquals("T", name) - assertEquals(DocumentationNodeKind.TypeParameter, kind) + assertEquals(DocumentationNode.Kind.TypeParameter, kind) assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) assertTrue(members.none()) @@ -68,18 +68,18 @@ public class FunctionTest { verifyModel("test/data/functions/genericFunctionWithConstraints.kt") { model -> with(model.members.single().members.single()) { assertEquals("generic", name) - assertEquals(DocumentationNodeKind.Function, kind) + assertEquals(DocumentationNode.Kind.Function, kind) assertEquals("generic function", doc.summary) assertEquals(3, details.count()) assertEquals("Unit", details.elementAt(0).name) with(details.elementAt(1)) { assertEquals("T", name) - assertEquals(DocumentationNodeKind.TypeParameter, kind) + assertEquals(DocumentationNode.Kind.TypeParameter, kind) assertEquals(DocumentationContent.Empty, doc) with(details.single()) { assertEquals("R", name) - assertEquals(DocumentationNodeKind.UpperBound, kind) + assertEquals(DocumentationNode.Kind.UpperBound, kind) assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) assertTrue(members.none()) @@ -90,7 +90,7 @@ public class FunctionTest { } with(details.elementAt(2)) { assertEquals("R", name) - assertEquals(DocumentationNodeKind.TypeParameter, kind) + assertEquals(DocumentationNode.Kind.TypeParameter, kind) assertEquals(DocumentationContent.Empty, doc) assertTrue(members.none()) assertTrue(links.none()) @@ -106,7 +106,7 @@ public class FunctionTest { verifyModel("test/data/functions/functionWithParams.kt") { model -> with(model.members.single().members.single()) { assertEquals("function", name) - assertEquals(DocumentationNodeKind.Function, kind) + assertEquals(DocumentationNode.Kind.Function, kind) assertEquals("""Multiline Function Documentation""" @@ -116,7 +116,7 @@ Documentation""" assertEquals("Unit", details.elementAt(0).name) with(details.elementAt(1)) { assertEquals("x", name) - assertEquals(DocumentationNodeKind.Parameter, kind) + assertEquals(DocumentationNode.Kind.Parameter, kind) assertEquals("parameter", doc.summary) assertEquals("Int", details.single().name) assertTrue(members.none()) diff --git a/test/src/model/PackageTest.kt b/test/src/model/PackageTest.kt index 1cb9efa8..8fda37ea 100644 --- a/test/src/model/PackageTest.kt +++ b/test/src/model/PackageTest.kt @@ -8,7 +8,7 @@ public class PackageTest { Test fun rootPackage() { verifyModel("test/data/packages/rootPackage.kt") { model -> with(model.members.single()) { - assertEquals(DocumentationNodeKind.Package, kind) + assertEquals(DocumentationNode.Kind.Package, kind) assertEquals("", name) assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) @@ -21,7 +21,7 @@ public class PackageTest { Test fun simpleNamePackage() { verifyModel("test/data/packages/simpleNamePackage.kt") { model -> with(model.members.single()) { - assertEquals(DocumentationNodeKind.Package, kind) + assertEquals(DocumentationNode.Kind.Package, kind) assertEquals("simple", name) assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) @@ -34,7 +34,7 @@ public class PackageTest { Test fun dottedNamePackage() { verifyModel("test/data/packages/dottedNamePackage.kt") { model -> with(model.members.single()) { - assertEquals(DocumentationNodeKind.Package, kind) + assertEquals(DocumentationNode.Kind.Package, kind) assertEquals("dot.name", name) assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) @@ -48,7 +48,7 @@ public class PackageTest { verifyModel("test/data/packages/dottedNamePackage.kt", "test/data/packages/simpleNamePackage.kt") { model -> assertEquals(2, model.members.count()) with(model.members.elementAt(0)) { - assertEquals(DocumentationNodeKind.Package, kind) + assertEquals(DocumentationNode.Kind.Package, kind) assertEquals("simple", name) assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) @@ -56,7 +56,7 @@ public class PackageTest { assertTrue(links.none()) } with(model.members.elementAt(1)) { - assertEquals(DocumentationNodeKind.Package, kind) + assertEquals(DocumentationNode.Kind.Package, kind) assertEquals("dot.name", name) assertEquals(DocumentationContent.Empty, doc) assertTrue(details.none()) diff --git a/test/src/model/PropertyTest.kt b/test/src/model/PropertyTest.kt index f810e4ed..7768af90 100644 --- a/test/src/model/PropertyTest.kt +++ b/test/src/model/PropertyTest.kt @@ -9,7 +9,7 @@ public class PropertyTest { verifyModel("test/data/properties/valueProperty.kt") { model -> with(model.members.single().members.single()) { assertEquals("property", name) - assertEquals(DocumentationNodeKind.Property, kind) + assertEquals(DocumentationNode.Kind.Property, kind) assertEquals(DocumentationContent.Empty, doc) assertEquals("String", details.single().name) assertTrue(members.none()) @@ -22,7 +22,7 @@ public class PropertyTest { verifyModel("test/data/properties/variableProperty.kt") { model -> with(model.members.single().members.single()) { assertEquals("property", name) - assertEquals(DocumentationNodeKind.Property, kind) + assertEquals(DocumentationNode.Kind.Property, kind) assertEquals(DocumentationContent.Empty, doc) assertEquals("String", details.single().name) assertTrue(members.none()) @@ -35,13 +35,13 @@ public class PropertyTest { verifyModel("test/data/properties/valuePropertyWithGetter.kt") { model -> with(model.members.single().members.single()) { assertEquals("property", name) - assertEquals(DocumentationNodeKind.Property, kind) + assertEquals(DocumentationNode.Kind.Property, kind) assertEquals(DocumentationContent.Empty, doc) assertEquals("String", details.single().name) assertTrue(links.none()) with(members.single()) { assertEquals("<get-property>", name) - assertEquals(DocumentationNodeKind.Function, kind) + assertEquals(DocumentationNode.Kind.Function, kind) assertEquals(DocumentationContent.Empty, doc) assertEquals("String", details.single().name) assertTrue(links.none()) @@ -55,7 +55,7 @@ public class PropertyTest { verifyModel("test/data/properties/variablePropertyWithAccessors.kt") { model -> with(model.members.single().members.single()) { assertEquals("property", name) - assertEquals(DocumentationNodeKind.Property, kind) + assertEquals(DocumentationNode.Kind.Property, kind) assertEquals(DocumentationContent.Empty, doc) assertEquals("String", details.single().name) assertTrue(links.none()) @@ -63,7 +63,7 @@ public class PropertyTest { assertEquals(2, members.count()) with(members.elementAt(0)) { assertEquals("<get-property>", name) - assertEquals(DocumentationNodeKind.Function, kind) + assertEquals(DocumentationNode.Kind.Function, kind) assertEquals(DocumentationContent.Empty, doc) assertEquals("String", details.single().name) assertTrue(links.none()) @@ -71,13 +71,13 @@ public class PropertyTest { } with(members.elementAt(1)) { assertEquals("<set-property>", name) - assertEquals(DocumentationNodeKind.Function, kind) + assertEquals(DocumentationNode.Kind.Function, kind) assertEquals(DocumentationContent.Empty, doc) assertEquals(2, details.count()) assertEquals("Unit", details.elementAt(0).name) with(details.elementAt(1)) { assertEquals("value", name) - assertEquals(DocumentationNodeKind.Parameter, kind) + assertEquals(DocumentationNode.Kind.Parameter, kind) assertEquals(DocumentationContent.Empty, doc) assertEquals("String", details.single().name) assertTrue(links.none()) |