aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/markdown
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/test/kotlin/markdown')
-rw-r--r--plugins/base/src/test/kotlin/markdown/KDocTest.kt4
-rw-r--r--plugins/base/src/test/kotlin/markdown/LinkTest.kt6
-rw-r--r--plugins/base/src/test/kotlin/markdown/ParserTest.kt99
3 files changed, 55 insertions, 54 deletions
diff --git a/plugins/base/src/test/kotlin/markdown/KDocTest.kt b/plugins/base/src/test/kotlin/markdown/KDocTest.kt
index fddd41e7..69885931 100644
--- a/plugins/base/src/test/kotlin/markdown/KDocTest.kt
+++ b/plugins/base/src/test/kotlin/markdown/KDocTest.kt
@@ -1,10 +1,10 @@
package markdown
+import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest
import org.jetbrains.dokka.model.DPackage
import org.jetbrains.dokka.model.doc.DocumentationNode
import org.jetbrains.dokka.pages.ModulePageNode
-import org.junit.jupiter.api.Assertions.*
-import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest
+import org.junit.jupiter.api.Assertions.assertEquals
abstract class KDocTest : BaseAbstractTest() {
diff --git a/plugins/base/src/test/kotlin/markdown/LinkTest.kt b/plugins/base/src/test/kotlin/markdown/LinkTest.kt
index f141bb06..526ff0eb 100644
--- a/plugins/base/src/test/kotlin/markdown/LinkTest.kt
+++ b/plugins/base/src/test/kotlin/markdown/LinkTest.kt
@@ -1,13 +1,13 @@
package markdown
+import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest
+import org.jetbrains.dokka.links.*
import org.jetbrains.dokka.model.WithGenerics
import org.jetbrains.dokka.model.dfs
+import org.jetbrains.dokka.model.doc.*
import org.jetbrains.dokka.pages.ClasslikePageNode
import org.jetbrains.dokka.pages.ContentDRILink
import org.jetbrains.dokka.pages.MemberPageNode
-import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest
-import org.jetbrains.dokka.links.*
-import org.jetbrains.dokka.model.doc.*
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Assertions.assertNotNull
import org.junit.jupiter.api.Test
diff --git a/plugins/base/src/test/kotlin/markdown/ParserTest.kt b/plugins/base/src/test/kotlin/markdown/ParserTest.kt
index fd723263..41b086ee 100644
--- a/plugins/base/src/test/kotlin/markdown/ParserTest.kt
+++ b/plugins/base/src/test/kotlin/markdown/ParserTest.kt
@@ -1,8 +1,9 @@
package org.jetbrains.dokka.tests
import markdown.KDocTest
-import org.intellij.markdown.MarkdownElementTypes
-import org.jetbrains.dokka.base.parsers.MarkdownParser
+
+import org.jetbrains.dokka.analysis.markdown.jb.MARKDOWN_ELEMENT_FILE_NAME
+import org.jetbrains.dokka.analysis.markdown.jb.MarkdownParser
import org.jetbrains.dokka.model.doc.*
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
@@ -25,7 +26,7 @@ class ParserTest : KDocTest() {
Description(
CustomDocTag(
listOf(P(listOf(Text("This is simple test of string Next line")))),
- name = MarkdownElementTypes.MARKDOWN_FILE.name
+ name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -52,7 +53,7 @@ class ParserTest : KDocTest() {
)
)
),
- name = MarkdownElementTypes.MARKDOWN_FILE.name
+ name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -81,7 +82,7 @@ class ParserTest : KDocTest() {
B(listOf(I(listOf(Text("line")))))
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -99,7 +100,7 @@ class ParserTest : KDocTest() {
Description(
CustomDocTag(
listOf(P(listOf(Text("This is simple text with: colon!")))),
- name = MarkdownElementTypes.MARKDOWN_FILE.name
+ name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -119,7 +120,7 @@ class ParserTest : KDocTest() {
Description(
CustomDocTag(
listOf(P(listOf(Text("Text and String")))),
- name = MarkdownElementTypes.MARKDOWN_FILE.name
+ name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -143,7 +144,7 @@ class ParserTest : KDocTest() {
listOf(
P(listOf(Text("Paragraph number one"))),
P(listOf(Text("Paragraph"), Br, Text("number two")))
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -159,7 +160,7 @@ class ParserTest : KDocTest() {
Description(
CustomDocTag(
listOf(P(listOf(I(listOf(Text("text")))))),
- name = MarkdownElementTypes.MARKDOWN_FILE.name
+ name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -175,7 +176,7 @@ class ParserTest : KDocTest() {
Description(
CustomDocTag(
listOf(P(listOf(Text("text_with_underscores")))),
- name = MarkdownElementTypes.MARKDOWN_FILE.name
+ name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -191,7 +192,7 @@ class ParserTest : KDocTest() {
Description(
CustomDocTag(
listOf(P(listOf(I(listOf(Text("text")))))),
- name = MarkdownElementTypes.MARKDOWN_FILE.name
+ name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -220,7 +221,7 @@ class ParserTest : KDocTest() {
Text("x\".")
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -249,7 +250,7 @@ class ParserTest : KDocTest() {
Text("x\".")
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -266,7 +267,7 @@ class ParserTest : KDocTest() {
CustomDocTag(
listOf(
P(listOf(Text("Embedded*Star")))
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -292,7 +293,7 @@ class ParserTest : KDocTest() {
Li(listOf(P(listOf(Text("list item 2")))))
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -319,7 +320,7 @@ class ParserTest : KDocTest() {
Li(listOf(P(listOf(Text("list item 2"), Br, Text("continue 2")))))
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -366,7 +367,7 @@ class ParserTest : KDocTest() {
)
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -414,7 +415,7 @@ class ParserTest : KDocTest() {
)
),
P(listOf(Text("New paragraph")))
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -440,7 +441,7 @@ class ParserTest : KDocTest() {
),
mapOf("start" to "1")
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -467,7 +468,7 @@ class ParserTest : KDocTest() {
),
mapOf("start" to "9")
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -495,7 +496,7 @@ class ParserTest : KDocTest() {
),
mapOf("start" to "2")
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -543,7 +544,7 @@ class ParserTest : KDocTest() {
),
mapOf("start" to "1")
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -594,7 +595,7 @@ class ParserTest : KDocTest() {
mapOf("start" to "1")
),
P(listOf(Text("New paragraph")))
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -644,7 +645,7 @@ class ParserTest : KDocTest() {
mapOf("start" to "1")
),
P(listOf(Text("New paragraph")))
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -668,7 +669,7 @@ class ParserTest : KDocTest() {
H1(listOf(Text("Header 1"))),
P(listOf(Text("Following text"))),
P(listOf(Text("New paragraph")))
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -710,7 +711,7 @@ class ParserTest : KDocTest() {
P(listOf(Text("Text 5"))),
H6(listOf(Text("Header 6"))),
P(listOf(Text("Text 6")))
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -736,7 +737,7 @@ class ParserTest : KDocTest() {
B(listOf(Text("line 2")))
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -771,7 +772,7 @@ class ParserTest : KDocTest() {
HorizontalRule,
P(listOf(Text("text 4"))),
HorizontalRule
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -809,7 +810,7 @@ class ParserTest : KDocTest() {
P(listOf(Text("Quote")))
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -854,7 +855,7 @@ class ParserTest : KDocTest() {
P(listOf(Text("Quote")))
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -916,7 +917,7 @@ class ParserTest : KDocTest() {
P(listOf(Text("Quote")))
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -941,7 +942,7 @@ class ParserTest : KDocTest() {
Text(" Sample text")
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -982,7 +983,7 @@ class ParserTest : KDocTest() {
mapOf("lang" to "kotlin")
),
P(listOf(Text("Sample text")))
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -1009,7 +1010,7 @@ class ParserTest : KDocTest() {
)
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -1035,7 +1036,7 @@ class ParserTest : KDocTest() {
)
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -1063,7 +1064,7 @@ class ParserTest : KDocTest() {
)
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -1091,7 +1092,7 @@ class ParserTest : KDocTest() {
)
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -1121,7 +1122,7 @@ class ParserTest : KDocTest() {
Text(".")
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -1151,7 +1152,7 @@ class ParserTest : KDocTest() {
Text(" and sometimes example.com (but not on Github, for example).")
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -1240,7 +1241,7 @@ class ParserTest : KDocTest() {
)
),
P(listOf(Text("Some text to show that the reference links can follow later.")))
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -1261,7 +1262,7 @@ class ParserTest : KDocTest() {
Text("text text")
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -1288,7 +1289,7 @@ class ParserTest : KDocTest() {
)
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -1315,7 +1316,7 @@ class ParserTest : KDocTest() {
A(listOf(Text("link to Google!")), mapOf("href" to "http://google.com"))
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -1348,7 +1349,7 @@ class ParserTest : KDocTest() {
)
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -1413,7 +1414,7 @@ class ParserTest : KDocTest() {
)
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -1437,7 +1438,7 @@ class ParserTest : KDocTest() {
Strikethrough(listOf(Text("strikethroughed")))
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -1464,7 +1465,7 @@ class ParserTest : KDocTest() {
)
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -1514,7 +1515,7 @@ class ParserTest : KDocTest() {
)
)
),
- name = MarkdownElementTypes.MARKDOWN_FILE.name
+ name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)
@@ -1537,7 +1538,7 @@ class ParserTest : KDocTest() {
CodeInline(listOf(Text("``` "))),
)
)
- ), name = MarkdownElementTypes.MARKDOWN_FILE.name
+ ), name = MARKDOWN_ELEMENT_FILE_NAME
)
)
)