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:
Petr Kudriavtsev
2018-01-15 15:02:36 +03:00
parent 82732aa45b
commit be7f7c9c68
3 changed files with 56 additions and 0 deletions
@@ -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*/;)
}
}
@@ -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*/)
}
}