aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-10-21 18:26:10 +0200
committerDmitry Jemerov <yole@jetbrains.com>2015-10-21 18:26:10 +0200
commitb8f2435e2db50c2053a9d880ab9573cb0bc2630e (patch)
tree55274c5b5e67191e32983559ffb8ea15c0c4df86 /test
parent8827d30048b9c50f47e62f69baf774363fdebc5d (diff)
downloaddokka-b8f2435e2db50c2053a9d880ab9573cb0bc2630e.tar.gz
dokka-b8f2435e2db50c2053a9d880ab9573cb0bc2630e.tar.bz2
dokka-b8f2435e2db50c2053a9d880ab9573cb0bc2630e.zip
M15 code cleanup
Diffstat (limited to 'test')
-rw-r--r--test/src/model/ClassTest.kt16
-rw-r--r--test/src/model/JavaTest.kt14
2 files changed, 15 insertions, 15 deletions
diff --git a/test/src/model/ClassTest.kt b/test/src/model/ClassTest.kt
index 24503273..0e2323c1 100644
--- a/test/src/model/ClassTest.kt
+++ b/test/src/model/ClassTest.kt
@@ -222,11 +222,11 @@ public class ClassTest {
verifyModel("test/data/classes/notOpenClass.kt") { model ->
with(model.members.single().members.first { it.name == "D"}.members.first { it.name == "f" }) {
val modifiers = details(DocumentationNode.Kind.Modifier)
- assertEquals(2, modifiers.size())
+ assertEquals(2, modifiers.size)
assertEquals("final", modifiers[1].name)
val overrideReferences = references(DocumentationReference.Kind.Override)
- assertEquals(1, overrideReferences.size())
+ assertEquals(1, overrideReferences.size)
}
}
}
@@ -235,11 +235,11 @@ public class ClassTest {
verifyModel("test/data/classes/indirectOverride.kt") { model ->
with(model.members.single().members.first { it.name == "E"}.members.first { it.name == "foo" }) {
val modifiers = details(DocumentationNode.Kind.Modifier)
- assertEquals(2, modifiers.size())
+ assertEquals(2, modifiers.size)
assertEquals("final", modifiers[1].name)
val overrideReferences = references(DocumentationReference.Kind.Override)
- assertEquals(1, overrideReferences.size())
+ assertEquals(1, overrideReferences.size)
}
}
}
@@ -248,7 +248,7 @@ public class ClassTest {
verifyPackageMember("test/data/classes/innerClass.kt") { cls ->
val innerClass = cls.members.single { it.name == "D" }
val modifiers = innerClass.details(DocumentationNode.Kind.Modifier)
- assertEquals(3, modifiers.size())
+ assertEquals(3, modifiers.size)
assertEquals("inner", modifiers[2].name)
}
}
@@ -258,15 +258,15 @@ public class ClassTest {
val pkg = model.members.single()
val cls = pkg.members.single { it.name == "Foo" }
val extensions = cls.extensions.filter { it.kind == DocumentationNode.Kind.CompanionObjectProperty }
- assertEquals(1, extensions.size())
+ assertEquals(1, extensions.size)
}
}
@Test fun secondaryConstructor() {
verifyPackageMember("test/data/classes/secondaryConstructor.kt") { cls ->
val constructors = cls.members(DocumentationNode.Kind.Constructor)
- assertEquals(2, constructors.size())
- with (constructors.first { it.details(DocumentationNode.Kind.Parameter).size()== 1}) {
+ assertEquals(2, constructors.size)
+ with (constructors.first { it.details(DocumentationNode.Kind.Parameter).size == 1}) {
assertEquals("<init>", name)
assertEquals("This is a secondary constructor.", summary.toTestString())
}
diff --git a/test/src/model/JavaTest.kt b/test/src/model/JavaTest.kt
index e74945c4..688cc8d9 100644
--- a/test/src/model/JavaTest.kt
+++ b/test/src/model/JavaTest.kt
@@ -13,7 +13,7 @@ public class JavaTest {
assertEquals("fn", name)
assertEquals(DocumentationNode.Kind.Function, kind)
assertEquals("Summary for Function", content.summary.toTestString().trimEnd())
- assertEquals(3, content.sections.size())
+ assertEquals(3, content.sections.size)
with(content.sections[0]) {
assertEquals("Parameters", tag)
assertEquals("name", subjectName)
@@ -58,7 +58,7 @@ public class JavaTest {
@Test fun superClass() {
verifyPackageMember("test/data/java/superClass.java") { cls ->
val superTypes = cls.details(DocumentationNode.Kind.Supertype)
- assertEquals(2, superTypes.size())
+ assertEquals(2, superTypes.size)
assertEquals("Exception", superTypes[0].name)
assertEquals("Cloneable", superTypes[1].name)
}
@@ -101,7 +101,7 @@ public class JavaTest {
@Test fun constructors() {
verifyPackageMember("test/data/java/constructors.java") { cls ->
val constructors = cls.members(DocumentationNode.Kind.Constructor)
- assertEquals(2, constructors.size())
+ assertEquals(2, constructors.size)
with(constructors[0]) {
assertEquals("<init>", name)
}
@@ -146,7 +146,7 @@ public class JavaTest {
@Test fun annotatedAnnotation() {
verifyPackageMember("test/data/java/annotatedAnnotation.java") { cls ->
- assertEquals(2, cls.annotations.size())
+ assertEquals(2, cls.annotations.size)
with(cls.annotations[0]) {
assertEquals(1, details.count())
with(details[0]) {
@@ -188,8 +188,8 @@ public class JavaTest {
@Test fun enumValues() {
verifyPackageMember("test/data/java/enumValues.java") { cls ->
val superTypes = cls.details(DocumentationNode.Kind.Supertype)
- assertEquals(0, superTypes.size())
- assertEquals(1, cls.members(DocumentationNode.Kind.EnumItem).size())
+ assertEquals(0, superTypes.size)
+ assertEquals(1, cls.members(DocumentationNode.Kind.EnumItem).size)
}
}
@@ -197,7 +197,7 @@ public class JavaTest {
verifyPackageMember("test/data/java/inheritorLinks.java") { cls ->
val fooClass = cls.members.single { it.name == "Foo" }
val inheritors = fooClass.references(DocumentationReference.Kind.Inheritor)
- assertEquals(1, inheritors.size())
+ assertEquals(1, inheritors.size)
}
}
}