Fix KT-13021, KT-13020, Test for already fixed KT-6941
Fixes on javadoc to kdoc comments convert
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* <a name="some_important_name">Important</a>
|
||||
* <a>Just an link without href</a>
|
||||
*/
|
||||
public class A {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* <a name="some_important_name">Important</a>
|
||||
* <a>Just an link without href</a>
|
||||
*/
|
||||
class A
|
||||
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* {@code A<B}
|
||||
*/
|
||||
public class C {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* `A<B`
|
||||
*/
|
||||
class C
|
||||
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Doc comment.<p>
|
||||
* <cite>cited</cite> <p>
|
||||
* <span class="important_class">spanned</span> <p>
|
||||
* <someSpecialTag>!!!</someSpecialTag>
|
||||
*/
|
||||
public class A {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Doc comment.
|
||||
*
|
||||
*
|
||||
* <cite>cited</cite>
|
||||
*
|
||||
*
|
||||
* <span class="important_class">spanned</span>
|
||||
*
|
||||
*
|
||||
* <someSpecialTag>!!!</someSpecialTag>
|
||||
*/
|
||||
class A
|
||||
@@ -1719,6 +1719,12 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class DocComments extends AbstractJavaToKotlinConverterForWebDemoTest {
|
||||
@TestMetadata("aWithoutHref.java")
|
||||
public void testAWithoutHref() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/aWithoutHref.java");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInDocComments() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/docComments"), Pattern.compile("^(.+)\\.java$"), true);
|
||||
}
|
||||
@@ -1735,6 +1741,13 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("escapedCharactersInCodeQuote.java")
|
||||
public void testEscapedCharactersInCodeQuote() throws Exception {
|
||||
String fileName =
|
||||
KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/escapedCharactersInCodeQuote.java");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("htmlInDocComment.java")
|
||||
public void testHtmlInDocComment() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/htmlInDocComment.java");
|
||||
@@ -1765,6 +1778,12 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("preserveUnknownTags.java")
|
||||
public void testPreserveUnknownTags() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/preserveUnknownTags.java");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("quoted.java")
|
||||
public void testQuoted() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/quoted.java");
|
||||
|
||||
@@ -1719,6 +1719,12 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class DocComments extends AbstractJavaToKotlinConverterSingleFileTest {
|
||||
@TestMetadata("aWithoutHref.java")
|
||||
public void testAWithoutHref() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/aWithoutHref.java");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInDocComments() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/docComments"), Pattern.compile("^(.+)\\.java$"), true);
|
||||
}
|
||||
@@ -1735,6 +1741,13 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("escapedCharactersInCodeQuote.java")
|
||||
public void testEscapedCharactersInCodeQuote() throws Exception {
|
||||
String fileName =
|
||||
KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/escapedCharactersInCodeQuote.java");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("htmlInDocComment.java")
|
||||
public void testHtmlInDocComment() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/htmlInDocComment.java");
|
||||
@@ -1765,6 +1778,12 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("preserveUnknownTags.java")
|
||||
public void testPreserveUnknownTags() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/preserveUnknownTags.java");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("quoted.java")
|
||||
public void testQuoted() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/quoted.java");
|
||||
|
||||
Reference in New Issue
Block a user