mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Additional fix for IDEABKL-4743 Automatic placement of ";" characters
-- after review improvement 4: added test cases for string/char literals
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
class Foo {
|
||||
|
||||
int takesCharSequence(CharSequence str) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int takesChar(char chr) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void testOutside() {
|
||||
// should be moved
|
||||
takesCharSequence(""/*typehere*/);
|
||||
takesChar(''/*typehere*/);
|
||||
}
|
||||
|
||||
void testInside() {
|
||||
// should not be moved
|
||||
takesCharSequence("/*typehere*/;")
|
||||
takesChar('/*typehere*/;')
|
||||
}
|
||||
|
||||
void testInComment() {
|
||||
// some comment blabla(/*typehere*/;)
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
class Foo {
|
||||
|
||||
int takesCharSequence(CharSequence str) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int takesChar(char chr) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void testOutside() {
|
||||
// should be moved
|
||||
takesCharSequence(""/*typehere*/)
|
||||
takesChar(''/*typehere*/)
|
||||
}
|
||||
|
||||
void testInside() {
|
||||
// should not be moved
|
||||
takesCharSequence("/*typehere*/")
|
||||
takesChar('/*typehere*/')
|
||||
}
|
||||
|
||||
void testInComment() {
|
||||
// some comment blabla(/*typehere*/)
|
||||
}
|
||||
}
|
||||
@@ -124,6 +124,10 @@ public class JavaTypingTest extends LightPlatformCodeInsightFixtureTestCase {
|
||||
doMultiTypeTest(';');
|
||||
}
|
||||
|
||||
public void testSemicolonBeforeRightParenInLiterals() {
|
||||
doMultiTypeTest(';');
|
||||
}
|
||||
|
||||
public void testCommaAfterDefaultAnnotationArgumentWhenArrayIsExpected() {
|
||||
doTest(',');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user