mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Preserving leading and trailing asterisks in javadoc while formatting (IDEA-138799)
This commit is contained in:
@@ -56,6 +56,61 @@ public class JavadocFormatterTest extends AbstractJavaFormatterTest {
|
||||
);
|
||||
}
|
||||
|
||||
public void test_do_wrap_on_asterisks() {
|
||||
doTextTest(
|
||||
"/***********\n" +
|
||||
" *\n" +
|
||||
" *********************/\n" +
|
||||
"\n" +
|
||||
"\n" +
|
||||
" public class Test {\n" +
|
||||
"}\n",
|
||||
"/***********\n" +
|
||||
" *\n" +
|
||||
" *********************/\n" +
|
||||
"\n" +
|
||||
"\n" +
|
||||
"public class Test {\n" +
|
||||
"}\n"
|
||||
);
|
||||
}
|
||||
|
||||
public void test_wrap_after_asterisks() {
|
||||
doTextTest(
|
||||
"/******* hollla la\n" +
|
||||
" * I am javadoc comment\n" +
|
||||
" * heey ***********/\n" +
|
||||
" class T { }\n",
|
||||
"/*******\n" +
|
||||
" * hollla la\n" +
|
||||
" * I am javadoc comment\n" +
|
||||
" * heey\n" +
|
||||
" ***********/\n" +
|
||||
"class T {\n" +
|
||||
"}\n"
|
||||
);
|
||||
}
|
||||
|
||||
public void test_strange_comment() {
|
||||
doTextTest(
|
||||
"/******F*****/\n" +
|
||||
"public class T {\n" +
|
||||
"}",
|
||||
"/******\n" +
|
||||
" * F\n" +
|
||||
" *****/\n" +
|
||||
"public class T {\n" +
|
||||
"}"
|
||||
);
|
||||
}
|
||||
|
||||
public void test_incomplete_javadoc() {
|
||||
doTextTest(
|
||||
"/**\n",
|
||||
"/**\n"
|
||||
);
|
||||
}
|
||||
|
||||
public void testEA49739() throws Exception {
|
||||
getSettings().WRAP_LONG_LINES = true;
|
||||
getSettings().RIGHT_MARGIN = 35;
|
||||
|
||||
Reference in New Issue
Block a user