diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/data/classes/classWithCompanionObject.kt (renamed from test/data/classes/classWithDefaultObject.kt) | 2 | ||||
-rw-r--r-- | test/data/classes/companionObjectExtension.kt (renamed from test/data/classes/defaultObjectExtension.kt) | 2 | ||||
-rw-r--r-- | test/data/format/classWithCompanionObject.html (renamed from test/data/format/classWithDefaultObject.html) | 4 | ||||
-rw-r--r-- | test/data/format/classWithCompanionObject.kt (renamed from test/data/format/classWithDefaultObject.kt) | 2 | ||||
-rw-r--r-- | test/data/format/classWithCompanionObject.md (renamed from test/data/format/classWithDefaultObject.md) | 4 | ||||
-rw-r--r-- | test/data/format/companionObjectExtension.kt (renamed from test/data/format/defaultObjectExtension.kt) | 2 | ||||
-rw-r--r-- | test/data/format/companionObjectExtension.md (renamed from test/data/format/defaultObjectExtension.md) | 2 | ||||
-rw-r--r-- | test/src/format/HtmlFormatTest.kt | 4 | ||||
-rw-r--r-- | test/src/format/MarkdownFormatTest.kt | 8 | ||||
-rw-r--r-- | test/src/markdown/MarkdownTestRunner.kt | 2 | ||||
-rw-r--r-- | test/src/model/ClassTest.kt | 14 | ||||
-rw-r--r-- | test/src/model/JavaTest.kt | 4 |
12 files changed, 25 insertions, 25 deletions
diff --git a/test/data/classes/classWithDefaultObject.kt b/test/data/classes/classWithCompanionObject.kt index 92e1a695..fdbd915d 100644 --- a/test/data/classes/classWithDefaultObject.kt +++ b/test/data/classes/classWithCompanionObject.kt @@ -1,5 +1,5 @@ class Klass() { - default object { + companion object { val x = 1 fun foo() {} diff --git a/test/data/classes/defaultObjectExtension.kt b/test/data/classes/companionObjectExtension.kt index 58d2e86a..4b471376 100644 --- a/test/data/classes/defaultObjectExtension.kt +++ b/test/data/classes/companionObjectExtension.kt @@ -1,5 +1,5 @@ class Foo { - default object Default { + companion object Default { } } diff --git a/test/data/format/classWithDefaultObject.html b/test/data/format/classWithCompanionObject.html index 663d8f64..be9247ea 100644 --- a/test/data/format/classWithDefaultObject.html +++ b/test/data/format/classWithCompanionObject.html @@ -20,7 +20,7 @@ </tr> </tbody> </table> -<h3>Default Object Properties</h3> +<h3>Companion Object Properties</h3> <table> <tbody> <tr> @@ -31,7 +31,7 @@ </tr> </tbody> </table> -<h3>Default Object Functions</h3> +<h3>Companion Object Functions</h3> <table> <tbody> <tr> diff --git a/test/data/format/classWithDefaultObject.kt b/test/data/format/classWithCompanionObject.kt index 92e1a695..fdbd915d 100644 --- a/test/data/format/classWithDefaultObject.kt +++ b/test/data/format/classWithCompanionObject.kt @@ -1,5 +1,5 @@ class Klass() { - default object { + companion object { val x = 1 fun foo() {} diff --git a/test/data/format/classWithDefaultObject.md b/test/data/format/classWithCompanionObject.md index 645f4755..9398c3d3 100644 --- a/test/data/format/classWithDefaultObject.md +++ b/test/data/format/classWithCompanionObject.md @@ -13,13 +13,13 @@ | [<init>](test/-klass/-init-) | `Klass()` | -### Default Object Properties +### Companion Object Properties | [x](test/-klass/x) | `val x: Int` | -### Default Object Functions +### Companion Object Functions | [foo](test/-klass/foo) | `fun foo(): Unit` | diff --git a/test/data/format/defaultObjectExtension.kt b/test/data/format/companionObjectExtension.kt index 78df38c5..f452de2c 100644 --- a/test/data/format/defaultObjectExtension.kt +++ b/test/data/format/companionObjectExtension.kt @@ -1,5 +1,5 @@ class Foo { - default object Default { + companion object Default { } } diff --git a/test/data/format/defaultObjectExtension.md b/test/data/format/companionObjectExtension.md index 4ede33e8..271da5b0 100644 --- a/test/data/format/defaultObjectExtension.md +++ b/test/data/format/companionObjectExtension.md @@ -13,7 +13,7 @@ | [<init>](test/-foo/-init-) | `Foo()` | -### Default Object Extension Properties +### Companion Object Extension Properties | [x](test/x) | `val Foo.Default.x: Int` diff --git a/test/src/format/HtmlFormatTest.kt b/test/src/format/HtmlFormatTest.kt index fb2df875..98b47f06 100644 --- a/test/src/format/HtmlFormatTest.kt +++ b/test/src/format/HtmlFormatTest.kt @@ -7,8 +7,8 @@ import org.jetbrains.dokka.HtmlFormatService public class HtmlFormatTest { private val htmlService = HtmlFormatService(InMemoryLocationService, KotlinLanguageService()) - Test fun classWithDefaultObject() { - verifyOutput("test/data/format/classWithDefaultObject.kt", ".html") { model, output -> + Test fun classWithCompanionObject() { + verifyOutput("test/data/format/classWithCompanionObject.kt", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members) } } diff --git a/test/src/format/MarkdownFormatTest.kt b/test/src/format/MarkdownFormatTest.kt index 1c46e662..059b491b 100644 --- a/test/src/format/MarkdownFormatTest.kt +++ b/test/src/format/MarkdownFormatTest.kt @@ -12,8 +12,8 @@ public class MarkdownFormatTest { } } - Test fun classWithDefaultObject() { - verifyOutput("test/data/format/classWithDefaultObject.kt", ".md") { model, output -> + Test fun classWithCompanionObject() { + verifyOutput("test/data/format/classWithCompanionObject.kt", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members) } } @@ -161,8 +161,8 @@ public class MarkdownFormatTest { } } - Test fun defaultObjectExtension() { - verifyOutput("test/data/format/defaultObjectExtension.kt", ".md") { model, output -> + Test fun companionObjectExtension() { + verifyOutput("test/data/format/companionObjectExtension.kt", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members.filter { it.name == "Foo" }) } } diff --git a/test/src/markdown/MarkdownTestRunner.kt b/test/src/markdown/MarkdownTestRunner.kt index 99c3732e..4aceb8e8 100644 --- a/test/src/markdown/MarkdownTestRunner.kt +++ b/test/src/markdown/MarkdownTestRunner.kt @@ -9,7 +9,7 @@ import kotlin.properties.Delegates import org.junit.ComparisonFailure data class MarkdownTestUniqueId(val id: Int) : Serializable { - default object { + companion object { var id = 0 fun next() = MarkdownTestUniqueId(id++) } 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 }) } } |