diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-09-11 16:45:11 +0200 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-09-11 16:45:11 +0200 |
commit | 757f72db456cf4dd12b0cfdbf312752d5951f166 (patch) | |
tree | e616cee86448fc9ae12c9cf67f27abecef0755f1 /test | |
parent | e67ee4136f69ad2c8ef65c4978465f43717517d2 (diff) | |
download | dokka-757f72db456cf4dd12b0cfdbf312752d5951f166.tar.gz dokka-757f72db456cf4dd12b0cfdbf312752d5951f166.tar.bz2 dokka-757f72db456cf4dd12b0cfdbf312752d5951f166.zip |
M13 code cleanup
Diffstat (limited to 'test')
-rw-r--r-- | test/src/format/HtmlFormatTest.kt | 46 | ||||
-rw-r--r-- | test/src/format/MarkdownFormatTest.kt | 48 | ||||
-rw-r--r-- | test/src/markdown/ParserTest.kt | 42 | ||||
-rw-r--r-- | test/src/model/ClassTest.kt | 26 | ||||
-rw-r--r-- | test/src/model/CommentTest.kt | 24 | ||||
-rw-r--r-- | test/src/model/FunctionTest.kt | 4 | ||||
-rw-r--r-- | test/src/model/JavaTest.kt | 30 | ||||
-rw-r--r-- | test/src/model/LinkTest.kt | 8 | ||||
-rw-r--r-- | test/src/model/PackageTest.kt | 10 | ||||
-rw-r--r-- | test/src/model/PropertyTest.kt | 14 |
10 files changed, 126 insertions, 126 deletions
diff --git a/test/src/format/HtmlFormatTest.kt b/test/src/format/HtmlFormatTest.kt index 3d744b95..5c7a63b3 100644 --- a/test/src/format/HtmlFormatTest.kt +++ b/test/src/format/HtmlFormatTest.kt @@ -11,37 +11,37 @@ import java.io.File public class HtmlFormatTest { private val htmlService = HtmlFormatService(InMemoryLocationService, KotlinLanguageService()) - Test fun classWithCompanionObject() { + @Test fun classWithCompanionObject() { verifyOutput("test/data/format/classWithCompanionObject.kt", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun htmlEscaping() { + @Test fun htmlEscaping() { verifyOutput("test/data/format/htmlEscaping.kt", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun overloads() { + @Test fun overloads() { verifyOutput("test/data/format/overloads.kt", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members) } } - Test fun overloadsWithDescription() { + @Test fun overloadsWithDescription() { verifyOutput("test/data/format/overloadsWithDescription.kt", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun overloadsWithDifferentDescriptions() { + @Test fun overloadsWithDifferentDescriptions() { verifyOutput("test/data/format/overloadsWithDifferentDescriptions.kt", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun deprecated() { + @Test fun deprecated() { verifyOutput("test/data/format/deprecated.kt", ".package.html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members) } @@ -50,85 +50,85 @@ public class HtmlFormatTest { } } - Test fun brokenLink() { + @Test fun brokenLink() { verifyOutput("test/data/format/brokenLink.kt", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun codeSpan() { + @Test fun codeSpan() { verifyOutput("test/data/format/codeSpan.kt", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun parenthesis() { + @Test fun parenthesis() { verifyOutput("test/data/format/parenthesis.kt", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun bracket() { + @Test fun bracket() { verifyOutput("test/data/format/bracket.kt", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun see() { + @Test fun see() { verifyOutput("test/data/format/see.kt", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun tripleBackticks() { + @Test fun tripleBackticks() { verifyOutput("test/data/format/tripleBackticks.kt", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun typeLink() { + @Test fun typeLink() { verifyOutput("test/data/format/typeLink.kt", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members.filter { it.name == "Bar"} ) } } - Test fun parameterAnchor() { + @Test fun parameterAnchor() { verifyOutput("test/data/format/parameterAnchor.kt", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun javaSupertypeLink() { + @Test fun javaSupertypeLink() { verifyOutput("test/data/format/javaSupertype.java", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members.single { it.name == "C"}.members.filter { it.name == "Bar"} ) } } - Test fun javaLinkTag() { + @Test fun javaLinkTag() { verifyOutput("test/data/format/javaLinkTag.java", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun javaLinkTagWithLabel() { + @Test fun javaLinkTagWithLabel() { verifyOutput("test/data/format/javaLinkTagWithLabel.java", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun javaSeeTag() { + @Test fun javaSeeTag() { verifyOutput("test/data/format/javaSeeTag.java", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun javaDeprecated() { + @Test fun javaDeprecated() { verifyOutput("test/data/format/javaDeprecated.java", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members.single { it.name == "Foo" }.members.filter { it.name == "foo" }) } } - Test fun crossLanguageKotlinExtendsJava() { + @Test fun crossLanguageKotlinExtendsJava() { verifyOutput(arrayOf(KotlinSourceRoot("test/data/format/crossLanguage/kotlinExtendsJava/Bar.kt"), JavaSourceRoot(File("test/data/format/crossLanguage/kotlinExtendsJava"))), ".html") { model, output -> @@ -136,19 +136,19 @@ public class HtmlFormatTest { } } - Test fun orderedList() { + @Test fun orderedList() { verifyOutput("test/data/format/orderedList.kt", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members.filter { it.name == "Bar" }) } } - Test fun linkWithLabel() { + @Test fun linkWithLabel() { verifyOutput("test/data/format/linkWithLabel.kt", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members.filter { it.name == "Bar" }) } } - Test fun entity() { + @Test fun entity() { verifyOutput("test/data/format/entity.kt", ".html") { model, output -> htmlService.appendNodes(tempLocation, output, model.members.single().members.filter { it.name == "Bar" }) } diff --git a/test/src/format/MarkdownFormatTest.kt b/test/src/format/MarkdownFormatTest.kt index 88003051..0df25fd5 100644 --- a/test/src/format/MarkdownFormatTest.kt +++ b/test/src/format/MarkdownFormatTest.kt @@ -7,25 +7,25 @@ import org.junit.Test public class MarkdownFormatTest { private val markdownService = MarkdownFormatService(InMemoryLocationService, KotlinLanguageService()) - Test fun emptyDescription() { + @Test fun emptyDescription() { verifyOutput("test/data/format/emptyDescription.kt", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun classWithCompanionObject() { + @Test fun classWithCompanionObject() { verifyOutput("test/data/format/classWithCompanionObject.kt", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun annotations() { + @Test fun annotations() { verifyOutput("test/data/format/annotations.kt", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun annotationClass() { + @Test fun annotationClass() { verifyOutput("test/data/format/annotationClass.kt", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members) } @@ -37,7 +37,7 @@ public class MarkdownFormatTest { } } - Test fun extensions() { + @Test fun extensions() { verifyOutput("test/data/format/extensions.kt", ".package.md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members) } @@ -46,7 +46,7 @@ public class MarkdownFormatTest { } } - Test fun enumClass() { + @Test fun enumClass() { verifyOutput("test/data/format/enumClass.kt", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members) } @@ -57,13 +57,13 @@ public class MarkdownFormatTest { } } - Test fun varargsFunction() { + @Test fun varargsFunction() { verifyOutput("test/data/format/varargsFunction.kt", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun overridingFunction() { + @Test fun overridingFunction() { verifyOutput("test/data/format/overridingFunction.kt", ".md") { model, output -> val classMembers = model.members.single().members.first { it.name == "D" }.members markdownService.appendNodes(tempLocation, output, classMembers.filter { it.name == "f" }) @@ -71,98 +71,98 @@ public class MarkdownFormatTest { } - Test fun propertyVar() { + @Test fun propertyVar() { verifyOutput("test/data/format/propertyVar.kt", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun functionWithDefaultParameter() { + @Test fun functionWithDefaultParameter() { verifyOutput("test/data/format/functionWithDefaultParameter.kt", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun accessor() { + @Test fun accessor() { verifyOutput("test/data/format/accessor.kt", ".md") { model, output -> val propertyNode = model.members.single().members.first { it.name == "C" }.members.filter { it.name == "x" } markdownService.appendNodes(tempLocation, output, propertyNode) } } - Test fun paramTag() { + @Test fun paramTag() { verifyOutput("test/data/format/paramTag.kt", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun throwsTag() { + @Test fun throwsTag() { verifyOutput("test/data/format/throwsTag.kt", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun typeParameterBounds() { + @Test fun typeParameterBounds() { verifyOutput("test/data/format/typeParameterBounds.kt", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun typeParameterVariance() { + @Test fun typeParameterVariance() { verifyOutput("test/data/format/typeParameterVariance.kt", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun typeProjectionVariance() { + @Test fun typeProjectionVariance() { verifyOutput("test/data/format/typeProjectionVariance.kt", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun javadocHtml() { + @Test fun javadocHtml() { verifyOutput("test/data/format/javadocHtml.java", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun javaCodeLiteralTags() { + @Test fun javaCodeLiteralTags() { verifyOutput("test/data/format/javaCodeLiteralTags.java", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun javaCodeInParam() { + @Test fun javaCodeInParam() { verifyOutput("test/data/format/javaCodeInParam.java", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun javaSpaceInAuthor() { + @Test fun javaSpaceInAuthor() { verifyOutput("test/data/format/javaSpaceInAuthor.java", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun nullability() { + @Test fun nullability() { verifyOutput("test/data/format/nullability.kt", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members) } } - Test fun operatorOverloading() { + @Test fun operatorOverloading() { verifyOutput("test/data/format/operatorOverloading.kt", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members.single { it.name == "C" }.members.filter { it.name == "plus" }) } } - Test fun javadocOrderedList() { + @Test fun javadocOrderedList() { verifyOutput("test/data/format/javadocOrderedList.java", ".md") { model, output -> markdownService.appendNodes(tempLocation, output, model.members.single().members.filter { it.name == "Bar" }) } } - Test fun companionObjectExtension() { + @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/ParserTest.kt b/test/src/markdown/ParserTest.kt index 50c18f08..62dd7a1f 100644 --- a/test/src/markdown/ParserTest.kt +++ b/test/src/markdown/ParserTest.kt @@ -6,7 +6,7 @@ import org.jetbrains.dokka.toTestString import org.jetbrains.dokka.parseMarkdown import org.junit.Ignore -Ignore public class ParserTest { +@Ignore public class ParserTest { fun runTestFor(text : String) { println("MD: ---") println(text) @@ -16,27 +16,27 @@ Ignore public class ParserTest { println() } - Test fun text() { + @Test fun text() { runTestFor("text") } - Test fun textWithSpaces() { + @Test fun textWithSpaces() { runTestFor("text and string") } - Test fun textWithColon() { + @Test fun textWithColon() { runTestFor("text and string: cool!") } - Test fun link() { + @Test fun link() { runTestFor("text [links]") } - Test fun linkWithHref() { + @Test fun linkWithHref() { runTestFor("text [links](http://google.com)") } - Test fun multiline() { + @Test fun multiline() { runTestFor( """ text @@ -45,7 +45,7 @@ string """) } - Test fun para() { + @Test fun para() { runTestFor( """ paragraph number @@ -56,14 +56,14 @@ number two """) } - Test fun bulletList() { + @Test fun bulletList() { runTestFor( """* list item 1 * list item 2 """) } - Test fun bulletListWithLines() { + @Test fun bulletListWithLines() { runTestFor( """ * list item 1 @@ -73,7 +73,7 @@ number two """) } - Test fun bulletListStrong() { + @Test fun bulletListStrong() { runTestFor( """ * list *item* 1 @@ -83,47 +83,47 @@ number two """) } - Test fun emph() { + @Test fun emph() { runTestFor("*text*") } - Test fun directive() { + @Test fun directive() { runTestFor("A text \${code with.another.value} with directive") } - Test fun emphAndEmptySection() { + @Test fun emphAndEmptySection() { runTestFor("*text*\n\$sec:\n") } - Test fun emphAndSection() { + @Test fun emphAndSection() { runTestFor("*text*\n\$sec: some text\n") } - Test fun emphAndBracedSection() { + @Test fun emphAndBracedSection() { runTestFor("Text *bold* text \n\${sec}: some text") } - Test fun section() { + @Test fun section() { runTestFor( "Plain text \n\$one: Summary \n\${two}: Description with *emphasis* \n\${An example of a section}: Example") } - Test fun anonymousSection() { + @Test fun anonymousSection() { runTestFor("Summary\n\nDescription\n") } - Test fun specialSection() { + @Test fun specialSection() { runTestFor( "Plain text \n\$\$summary: Summary \n\${\$description}: Description \n\${\$An example of a section}: Example") } - Test fun emptySection() { + @Test fun emptySection() { runTestFor( "Plain text \n\$summary:") } val b = "$" - Test fun pair() { + @Test fun pair() { runTestFor( """Represents a generic pair of two values. diff --git a/test/src/model/ClassTest.kt b/test/src/model/ClassTest.kt index 8c3adb7f..24503273 100644 --- a/test/src/model/ClassTest.kt +++ b/test/src/model/ClassTest.kt @@ -8,7 +8,7 @@ import kotlin.test.assertEquals import kotlin.test.assertTrue public class ClassTest { - Test fun emptyClass() { + @Test fun emptyClass() { verifyModel("test/data/classes/emptyClass.kt") { model -> with(model.members.single().members.single()) { assertEquals(DocumentationNode.Kind.Class, kind) @@ -20,7 +20,7 @@ public class ClassTest { } } - Test fun emptyObject() { + @Test fun emptyObject() { verifyModel("test/data/classes/emptyObject.kt") { model -> with(model.members.single().members.single()) { assertEquals(DocumentationNode.Kind.Object, kind) @@ -32,7 +32,7 @@ public class ClassTest { } } - Test fun classWithConstructor() { + @Test fun classWithConstructor() { verifyModel("test/data/classes/classWithConstructor.kt") { model -> with (model.members.single().members.single()) { assertEquals(DocumentationNode.Kind.Class, kind) @@ -62,7 +62,7 @@ public class ClassTest { } } - Test fun classWithFunction() { + @Test fun classWithFunction() { verifyModel("test/data/classes/classWithFunction.kt") { model -> with(model.members.single().members.single()) { assertEquals(DocumentationNode.Kind.Class, kind) @@ -92,7 +92,7 @@ public class ClassTest { } } - Test fun classWithProperty() { + @Test fun classWithProperty() { verifyModel("test/data/classes/classWithProperty.kt") { model -> with(model.members.single().members.single()) { assertEquals(DocumentationNode.Kind.Class, kind) @@ -122,7 +122,7 @@ public class ClassTest { } } - Test fun classWithCompanionObject() { + @Test fun classWithCompanionObject() { verifyModel("test/data/classes/classWithCompanionObject.kt") { model -> with(model.members.single().members.single()) { assertEquals(DocumentationNode.Kind.Class, kind) @@ -176,7 +176,7 @@ public class ClassTest { } } - Test fun annotatedClassWithAnnotationParameters() { + @Test fun annotatedClassWithAnnotationParameters() { verifyModel("test/data/classes/annotatedClassWithAnnotationParameters.kt") { model -> with(model.members.single().members.single()) { with(deprecation!!) { @@ -197,7 +197,7 @@ public class ClassTest { } } - Test fun javaAnnotationClass() { + @Test fun javaAnnotationClass() { verifyModel("test/data/classes/javaAnnotationClass.kt") { model -> with(model.members.single().members.single()) { assertEquals(1, annotations.count()) @@ -218,7 +218,7 @@ public class ClassTest { } } - Test fun notOpenClass() { + @Test fun notOpenClass() { 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) @@ -231,7 +231,7 @@ public class ClassTest { } } - Test fun indirectOverride() { + @Test fun indirectOverride() { 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) @@ -244,7 +244,7 @@ public class ClassTest { } } - Test fun innerClass() { + @Test fun innerClass() { verifyPackageMember("test/data/classes/innerClass.kt") { cls -> val innerClass = cls.members.single { it.name == "D" } val modifiers = innerClass.details(DocumentationNode.Kind.Modifier) @@ -253,7 +253,7 @@ public class ClassTest { } } - Test fun companionObjectExtension() { + @Test fun companionObjectExtension() { verifyModel("test/data/classes/companionObjectExtension.kt") { model -> val pkg = model.members.single() val cls = pkg.members.single { it.name == "Foo" } @@ -262,7 +262,7 @@ public class ClassTest { } } - Test fun secondaryConstructor() { + @Test fun secondaryConstructor() { verifyPackageMember("test/data/classes/secondaryConstructor.kt") { cls -> val constructors = cls.members(DocumentationNode.Kind.Constructor) assertEquals(2, constructors.size()) diff --git a/test/src/model/CommentTest.kt b/test/src/model/CommentTest.kt index 98585b18..c4d867fb 100644 --- a/test/src/model/CommentTest.kt +++ b/test/src/model/CommentTest.kt @@ -5,7 +5,7 @@ import kotlin.test.* import org.jetbrains.dokka.* public class CommentTest { - Test fun emptyDoc() { + @Test fun emptyDoc() { verifyModel("test/data/comments/emptyDoc.kt") { model -> with(model.members.single().members.single()) { assertEquals(Content.Empty, content) @@ -13,7 +13,7 @@ public class CommentTest { } } - Test fun emptyDocButComment() { + @Test fun emptyDocButComment() { verifyModel("test/data/comments/emptyDocButComment.kt") { model -> with(model.members.single().members.single()) { assertEquals(Content.Empty, content) @@ -21,7 +21,7 @@ public class CommentTest { } } - Test fun multilineDoc() { + @Test fun multilineDoc() { verifyModel("test/data/comments/multilineDoc.kt") { model -> with(model.members.single().members.single()) { assertEquals("doc1", content.summary.toTestString()) @@ -30,7 +30,7 @@ public class CommentTest { } } - Test fun multilineDocWithComment() { + @Test fun multilineDocWithComment() { verifyModel("test/data/comments/multilineDocWithComment.kt") { model -> with(model.members.single().members.single()) { assertEquals("doc1", content.summary.toTestString()) @@ -39,7 +39,7 @@ public class CommentTest { } } - Test fun oneLineDoc() { + @Test fun oneLineDoc() { verifyModel("test/data/comments/oneLineDoc.kt") { model -> with(model.members.single().members.single()) { assertEquals("doc", content.summary.toTestString()) @@ -47,7 +47,7 @@ public class CommentTest { } } - Test fun oneLineDocWithComment() { + @Test fun oneLineDocWithComment() { verifyModel("test/data/comments/oneLineDocWithComment.kt") { model -> with(model.members.single().members.single()) { assertEquals("doc", content.summary.toTestString()) @@ -55,7 +55,7 @@ public class CommentTest { } } - Test fun oneLineDocWithEmptyLine() { + @Test fun oneLineDocWithEmptyLine() { verifyModel("test/data/comments/oneLineDocWithEmptyLine.kt") { model -> with(model.members.single().members.single()) { assertEquals("doc", content.summary.toTestString()) @@ -63,7 +63,7 @@ public class CommentTest { } } - Test fun emptySection() { + @Test fun emptySection() { verifyModel("test/data/comments/emptySection.kt") { model -> with(model.members.single().members.single()) { assertEquals("Summary", content.summary.toTestString()) @@ -76,7 +76,7 @@ public class CommentTest { } } - Test fun section1() { + @Test fun section1() { verifyModel("test/data/comments/section1.kt") { model -> with(model.members.single().members.single()) { assertEquals("Summary", content.summary.toTestString()) @@ -89,7 +89,7 @@ public class CommentTest { } } - Test fun section2() { + @Test fun section2() { verifyModel("test/data/comments/section2.kt") { model -> with(model.members.single().members.single()) { assertEquals("Summary", content.summary.toTestString()) @@ -106,7 +106,7 @@ public class CommentTest { } } - Test fun multilineSection() { + @Test fun multilineSection() { verifyModel("test/data/comments/multilineSection.kt") { model -> with(model.members.single().members.single()) { assertEquals("Summary", content.summary.toTestString()) @@ -120,7 +120,7 @@ line two""", toTestString()) } } - Test fun directive() { + @Test fun directive() { verifyModel("test/data/comments/directive.kt") { model -> with(model.members.single().members.first()) { assertEquals("Summary", content.summary.toTestString()) diff --git a/test/src/model/FunctionTest.kt b/test/src/model/FunctionTest.kt index 734675de..fc3ebae5 100644 --- a/test/src/model/FunctionTest.kt +++ b/test/src/model/FunctionTest.kt @@ -189,7 +189,7 @@ Documentation""", content.description.toTestString()) } } - Test fun annotatedFunctionWithAnnotationParameters() { + @Test fun annotatedFunctionWithAnnotationParameters() { verifyModel("test/data/functions/annotatedFunctionWithAnnotationParameters.kt") { model -> with(model.members.single().members.single()) { assertEquals(1, annotations.count()) @@ -211,7 +211,7 @@ Documentation""", content.description.toTestString()) } } - Test fun functionWithDefaultParameter() { + @Test fun functionWithDefaultParameter() { verifyModel("test/data/functions/functionWithDefaultParameter.kt") { model -> with(model.members.single().members.single()) { with(details.elementAt(2)) { diff --git a/test/src/model/JavaTest.kt b/test/src/model/JavaTest.kt index 3129bcc0..e74945c4 100644 --- a/test/src/model/JavaTest.kt +++ b/test/src/model/JavaTest.kt @@ -5,7 +5,7 @@ import org.jetbrains.dokka.* import org.junit.* public class JavaTest { - Test fun function() { + @Test fun function() { verifyPackageMember("test/data/java/member.java") { cls -> assertEquals("Test", cls.name) assertEquals(DocumentationNode.Kind.Class, cls.kind) @@ -43,7 +43,7 @@ public class JavaTest { } } - Test fun memberWithModifiers() { + @Test fun memberWithModifiers() { verifyPackageMember("test/data/java/memberWithModifiers.java") { cls -> assertEquals("abstract", cls.details[0].name) with(cls.members.single { it.name == "fn" }) { @@ -55,7 +55,7 @@ public class JavaTest { } } - Test fun superClass() { + @Test fun superClass() { verifyPackageMember("test/data/java/superClass.java") { cls -> val superTypes = cls.details(DocumentationNode.Kind.Supertype) assertEquals(2, superTypes.size()) @@ -64,7 +64,7 @@ public class JavaTest { } } - Test fun arrayType() { + @Test fun arrayType() { verifyPackageMember("test/data/java/arrayType.java") { cls -> with(cls.members.single()) { val type = detail(DocumentationNode.Kind.Type) @@ -79,7 +79,7 @@ public class JavaTest { } } - Test fun typeParameter() { + @Test fun typeParameter() { verifyPackageMember("test/data/java/typeParameter.java") { cls -> val typeParameters = cls.details(DocumentationNode.Kind.TypeParameter) with(typeParameters.single()) { @@ -98,7 +98,7 @@ public class JavaTest { } } - Test fun constructors() { + @Test fun constructors() { verifyPackageMember("test/data/java/constructors.java") { cls -> val constructors = cls.members(DocumentationNode.Kind.Constructor) assertEquals(2, constructors.size()) @@ -108,14 +108,14 @@ public class JavaTest { } } - Test fun innerClass() { + @Test fun innerClass() { verifyPackageMember("test/data/java/innerClass.java") { cls -> val innerClass = cls.members(DocumentationNode.Kind.Class).single() assertEquals("D", innerClass.name) } } - Test fun varargs() { + @Test fun varargs() { verifyPackageMember("test/data/java/varargs.java") { cls -> val fn = cls.members(DocumentationNode.Kind.Function).single() val param = fn.detail(DocumentationNode.Kind.Parameter) @@ -126,7 +126,7 @@ public class JavaTest { } } - Test fun fields() { + @Test fun fields() { verifyPackageMember("test/data/java/field.java") { cls -> val i = cls.members(DocumentationNode.Kind.Property).single { it.name == "i" } assertEquals("Int", i.detail(DocumentationNode.Kind.Type).name) @@ -137,14 +137,14 @@ public class JavaTest { } } - Test fun staticMethod() { + @Test fun staticMethod() { verifyPackageMember("test/data/java/staticMethod.java") { cls -> val m = cls.members(DocumentationNode.Kind.CompanionObjectFunction).single { it.name == "foo" } assertFalse("static" in m.details(DocumentationNode.Kind.Modifier).map { it.name }) } } - Test fun annotatedAnnotation() { + @Test fun annotatedAnnotation() { verifyPackageMember("test/data/java/annotatedAnnotation.java") { cls -> assertEquals(2, cls.annotations.size()) with(cls.annotations[0]) { @@ -161,7 +161,7 @@ public class JavaTest { } } - Test fun deprecation() { + @Test fun deprecation() { verifyPackageMember("test/data/java/deprecation.java") { cls -> val fn = cls.members(DocumentationNode.Kind.Function).single() with(fn.deprecation!!) { @@ -178,14 +178,14 @@ public class JavaTest { } } - Test fun javaLangObject() { + @Test fun javaLangObject() { verifyPackageMember("test/data/java/javaLangObject.java") { cls -> val fn = cls.members(DocumentationNode.Kind.Function).single() assertEquals("Any", fn.detail(DocumentationNode.Kind.Type).name) } } - Test fun enumValues() { + @Test fun enumValues() { verifyPackageMember("test/data/java/enumValues.java") { cls -> val superTypes = cls.details(DocumentationNode.Kind.Supertype) assertEquals(0, superTypes.size()) @@ -193,7 +193,7 @@ public class JavaTest { } } - Test fun inheritorLinks() { + @Test fun inheritorLinks() { verifyPackageMember("test/data/java/inheritorLinks.java") { cls -> val fooClass = cls.members.single { it.name == "Foo" } val inheritors = fooClass.references(DocumentationReference.Kind.Inheritor) diff --git a/test/src/model/LinkTest.kt b/test/src/model/LinkTest.kt index 151d2696..a8004367 100644 --- a/test/src/model/LinkTest.kt +++ b/test/src/model/LinkTest.kt @@ -5,7 +5,7 @@ import kotlin.test.* import org.jetbrains.dokka.* public class LinkTest { - Test fun linkToSelf() { + @Test fun linkToSelf() { verifyModel("test/data/links/linkToSelf.kt") { model -> with(model.members.single().members.single()) { assertEquals("Foo", name) @@ -15,7 +15,7 @@ public class LinkTest { } } - Test fun linkToMember() { + @Test fun linkToMember() { verifyModel("test/data/links/linkToMember.kt") { model -> with(model.members.single().members.single()) { assertEquals("Foo", name) @@ -25,7 +25,7 @@ public class LinkTest { } } - Test fun linkToQualifiedMember() { + @Test fun linkToQualifiedMember() { verifyModel("test/data/links/linkToQualifiedMember.kt") { model -> with(model.members.single().members.single()) { assertEquals("Foo", name) @@ -35,7 +35,7 @@ public class LinkTest { } } - Test fun linkToParam() { + @Test fun linkToParam() { verifyModel("test/data/links/linkToParam.kt") { model -> with(model.members.single().members.single()) { assertEquals("Foo", name) diff --git a/test/src/model/PackageTest.kt b/test/src/model/PackageTest.kt index 701efbf0..52324f1d 100644 --- a/test/src/model/PackageTest.kt +++ b/test/src/model/PackageTest.kt @@ -8,7 +8,7 @@ import kotlin.test.assertEquals import kotlin.test.assertTrue public class PackageTest { - Test fun rootPackage() { + @Test fun rootPackage() { verifyModel("test/data/packages/rootPackage.kt") { model -> with(model.members.single()) { assertEquals(DocumentationNode.Kind.Package, kind) @@ -21,7 +21,7 @@ public class PackageTest { } } - Test fun simpleNamePackage() { + @Test fun simpleNamePackage() { verifyModel("test/data/packages/simpleNamePackage.kt") { model -> with(model.members.single()) { assertEquals(DocumentationNode.Kind.Package, kind) @@ -34,7 +34,7 @@ public class PackageTest { } } - Test fun dottedNamePackage() { + @Test fun dottedNamePackage() { verifyModel("test/data/packages/dottedNamePackage.kt") { model -> with(model.members.single()) { assertEquals(DocumentationNode.Kind.Package, kind) @@ -47,7 +47,7 @@ public class PackageTest { } } - Test fun multipleFiles() { + @Test fun multipleFiles() { verifyModel(KotlinSourceRoot("test/data/packages/dottedNamePackage.kt"), KotlinSourceRoot("test/data/packages/simpleNamePackage.kt")) { model -> assertEquals(2, model.members.count()) @@ -69,7 +69,7 @@ public class PackageTest { } } - Test fun multipleFilesSamePackage() { + @Test fun multipleFilesSamePackage() { verifyModel(KotlinSourceRoot("test/data/packages/simpleNamePackage.kt"), KotlinSourceRoot("test/data/packages/simpleNamePackage2.kt")) { model -> assertEquals(1, model.members.count()) diff --git a/test/src/model/PropertyTest.kt b/test/src/model/PropertyTest.kt index 0853cbc5..0da510ed 100644 --- a/test/src/model/PropertyTest.kt +++ b/test/src/model/PropertyTest.kt @@ -8,7 +8,7 @@ import kotlin.test.assertEquals import kotlin.test.assertTrue public class PropertyTest { - Test fun valueProperty() { + @Test fun valueProperty() { verifyModel("test/data/properties/valueProperty.kt") { model -> with(model.members.single().members.single()) { assertEquals("property", name) @@ -21,7 +21,7 @@ public class PropertyTest { } } - Test fun variableProperty() { + @Test fun variableProperty() { verifyModel("test/data/properties/variableProperty.kt") { model -> with(model.members.single().members.single()) { assertEquals("property", name) @@ -34,7 +34,7 @@ public class PropertyTest { } } - Test fun valuePropertyWithGetter() { + @Test fun valuePropertyWithGetter() { verifyModel("test/data/properties/valuePropertyWithGetter.kt") { model -> with(model.members.single().members.single()) { assertEquals("property", name) @@ -47,7 +47,7 @@ public class PropertyTest { } } - Test fun variablePropertyWithAccessors() { + @Test fun variablePropertyWithAccessors() { verifyModel("test/data/properties/variablePropertyWithAccessors.kt") { model -> with(model.members.single().members.single()) { assertEquals("property", name) @@ -64,7 +64,7 @@ public class PropertyTest { } } - Test fun annotatedProperty() { + @Test fun annotatedProperty() { verifyModel("test/data/properties/annotatedProperty.kt") { model -> with(model.members.single().members.single()) { assertEquals(1, annotations.count()) @@ -77,7 +77,7 @@ public class PropertyTest { } } - Test fun propertyWithReceiver() { + @Test fun propertyWithReceiver() { verifyModel("test/data/properties/propertyWithReceiver.kt") { model -> with(model.members.single().members.single()) { assertEquals("String", name) @@ -90,7 +90,7 @@ public class PropertyTest { } } - Test fun propertyOverride() { + @Test fun propertyOverride() { verifyModel("test/data/properties/propertyOverride.kt") { model -> with(model.members.single().members.single { it.name == "Bar" }.members.single { it.name == "xyzzy"}) { assertEquals("xyzzy", name) |