aboutsummaryrefslogtreecommitdiff
path: root/test/src/model
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-03-17 19:54:11 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-03-17 19:54:11 +0100
commitc7916f74964246bee4d256c106b01c7e317e6c10 (patch)
tree39d28310f12ae4b8e3d4f182aa66b1e5b1c4319e /test/src/model
parent0406a6bce4f461f3ae846911505701324411fa9b (diff)
downloaddokka-c7916f74964246bee4d256c106b01c7e317e6c10.tar.gz
dokka-c7916f74964246bee4d256c106b01c7e317e6c10.tar.bz2
dokka-c7916f74964246bee4d256c106b01c7e317e6c10.zip
default objects -> companion objects
Diffstat (limited to 'test/src/model')
-rw-r--r--test/src/model/ClassTest.kt14
-rw-r--r--test/src/model/JavaTest.kt4
2 files changed, 9 insertions, 9 deletions
diff --git a/test/src/model/ClassTest.kt b/test/src/model/ClassTest.kt
index 0a8fc147..6eec91cc 100644
--- a/test/src/model/ClassTest.kt
+++ b/test/src/model/ClassTest.kt
@@ -124,8 +124,8 @@ public class ClassTest {
}
}
- Test fun classWithDefaultObject() {
- verifyModel("test/data/classes/classWithDefaultObject.kt") { model ->
+ Test fun classWithCompanionObject() {
+ verifyModel("test/data/classes/classWithCompanionObject.kt") { model ->
with(model.members.single().members.single()) {
assertEquals(DocumentationNode.Kind.Class, kind)
assertEquals("Klass", name)
@@ -140,13 +140,13 @@ public class ClassTest {
}
with(members.elementAt(1)) {
assertEquals("x", name)
- assertEquals(DocumentationNode.Kind.DefaultObjectProperty, kind)
+ assertEquals(DocumentationNode.Kind.CompanionObjectProperty, kind)
assertTrue(members.none())
assertTrue(links.none())
}
with(members.elementAt(2)) {
assertEquals("foo", name)
- assertEquals(DocumentationNode.Kind.DefaultObjectFunction, kind)
+ assertEquals(DocumentationNode.Kind.CompanionObjectFunction, kind)
assertTrue(members.none())
assertTrue(links.none())
}
@@ -245,11 +245,11 @@ public class ClassTest {
}
}
- Test fun defaultObjectExtension() {
- verifyModel("test/data/classes/defaultObjectExtension.kt") { model ->
+ Test fun companionObjectExtension() {
+ verifyModel("test/data/classes/companionObjectExtension.kt") { model ->
val pkg = model.members.single()
val cls = pkg.members.single { it.name == "Foo" }
- val extensions = cls.extensions.filter { it.kind == DocumentationNode.Kind.DefaultObjectProperty }
+ val extensions = cls.extensions.filter { it.kind == DocumentationNode.Kind.CompanionObjectProperty }
assertEquals(1, extensions.size())
}
}
diff --git a/test/src/model/JavaTest.kt b/test/src/model/JavaTest.kt
index 41feb26a..cef548c3 100644
--- a/test/src/model/JavaTest.kt
+++ b/test/src/model/JavaTest.kt
@@ -131,7 +131,7 @@ public class JavaTest {
val i = cls.members(DocumentationNode.Kind.Property).single { it.name == "i" }
assertEquals("Int", i.detail(DocumentationNode.Kind.Type).name)
assertTrue("var" in i.details(DocumentationNode.Kind.Modifier).map { it.name })
- val s = cls.members(DocumentationNode.Kind.DefaultObjectProperty).single { it.name == "s" }
+ val s = cls.members(DocumentationNode.Kind.CompanionObjectProperty).single { it.name == "s" }
assertEquals("String", s.detail(DocumentationNode.Kind.Type).name)
assertFalse("var" in s.details(DocumentationNode.Kind.Modifier).map { it.name })
}
@@ -139,7 +139,7 @@ public class JavaTest {
Test fun staticMethod() {
verifyPackageMember("test/data/java/staticMethod.java") { cls ->
- val m = cls.members(DocumentationNode.Kind.DefaultObjectFunction).single { it.name == "foo" }
+ val m = cls.members(DocumentationNode.Kind.CompanionObjectFunction).single { it.name == "foo" }
assertFalse("static" in m.details(DocumentationNode.Kind.Modifier).map { it.name })
}
}