SSR: simplify "constructors of the class" template and test

This commit is contained in:
Bas Leijdekkers
2017-11-24 18:14:09 +01:00
parent 49b0565d12
commit c896eb9a33
2 changed files with 13 additions and 1 deletions
@@ -86,7 +86,7 @@ class JavaPredefinedConfigurations {
),
createSearchTemplateInfo(
SSRBundle.message("predefined.configuration.constructors.of.the.class"),
"class 'Class {\n 'Class('_ParameterType '_Parameter*) {\n '_Statement*;\n }\n}",
"'Class('_ParameterType '_Parameter*) {\n '_Statement*;\n}",
CLASS_TYPE
),
createSearchTemplateInfo(
@@ -45,6 +45,18 @@ public class JavaPredefinedConfigurationsTest extends StructuralSearchTestCase {
asList("System.out.println()",
"System.out.println(1)",
"x()")));
testCases.put(SSRBundle.message("predefined.configuration.constructors.of.the.class"),
pair("class X {" +
" X() {}" +
" X(int i) {" +
" System.out.println(i);" +
" }" +
" X(String... ss) {}" +
" void m() {}" +
"}",
asList("X() {}",
"X(int i) { System.out.println(i); }",
"X(String... ss) {}")));
}
public void testPredefinedConfigurations() {