< prev index next >

test/langtools/jdk/jshell/CompletenessTest.java

Print this page




 105         "for (Object o : a) System.out.println(\"Yep\")",
 106         "while (os == null) System.out.println(\"Yep\")",
 107         "do f(); while (t)",
 108         "if (os == null) System.out.println(\"Yep\")",
 109         "if (t) if (!t) System.out.println(123)",
 110         "for (int i = 0; i < 10; ++i) if (i < 5) System.out.println(i); else break",
 111         "for (int i = 0; i < 10; ++i) if (i < 5) System.out.println(i); else continue",
 112         "for (int i = 0; i < 10; ++i) if (i < 5) System.out.println(i); else return",
 113         "throw ex",
 114         "C c = new C()",
 115         "java.util.zip.ZipFile zf = new java.util.zip.ZipFile(zipFileName)",
 116         "BufferedReader br = new BufferedReader(new FileReader(path))",
 117         "bar: g()",
 118         "baz: while (true) if (t()) printf('-'); else break baz",
 119         "java.util.function.IntFunction<int[]> ggg = int[]::new",
 120         "List<? extends Object> l",
 121         "int[] m = {1, 2}",
 122         "int[] m = {1, 2}, n = null",
 123         "int[] m = {1, 2}, n",
 124         "int[] m = {1, 2}, n = {3, 4}",


 125     };
 126 
 127     static final String[] considered_incomplete = new String[] {
 128         "if (t)",
 129         "if (t) { } else",
 130         "if (t) if (!t)",
 131         "if (match.kind == BRACES && (prevCT.kind == ARROW || prevCT.kind == NEW_MIDDLE))",
 132         "for (int i = 0; i < 10; ++i)",
 133         "while (os == null)",
 134     };
 135 
 136     static final String[] definitely_incomplete = new String[] {
 137         "int mm(",
 138         "int mm(int x",
 139         "int mm(int x)",
 140         "int mm(int x) {",
 141         "int mm(int x) {kll",
 142         "if",
 143         "if (",
 144         "if (t",




 105         "for (Object o : a) System.out.println(\"Yep\")",
 106         "while (os == null) System.out.println(\"Yep\")",
 107         "do f(); while (t)",
 108         "if (os == null) System.out.println(\"Yep\")",
 109         "if (t) if (!t) System.out.println(123)",
 110         "for (int i = 0; i < 10; ++i) if (i < 5) System.out.println(i); else break",
 111         "for (int i = 0; i < 10; ++i) if (i < 5) System.out.println(i); else continue",
 112         "for (int i = 0; i < 10; ++i) if (i < 5) System.out.println(i); else return",
 113         "throw ex",
 114         "C c = new C()",
 115         "java.util.zip.ZipFile zf = new java.util.zip.ZipFile(zipFileName)",
 116         "BufferedReader br = new BufferedReader(new FileReader(path))",
 117         "bar: g()",
 118         "baz: while (true) if (t()) printf('-'); else break baz",
 119         "java.util.function.IntFunction<int[]> ggg = int[]::new",
 120         "List<? extends Object> l",
 121         "int[] m = {1, 2}",
 122         "int[] m = {1, 2}, n = null",
 123         "int[] m = {1, 2}, n",
 124         "int[] m = {1, 2}, n = {3, 4}",
 125         "record D(int i)",
 126         "static record D(int i)"
 127     };
 128 
 129     static final String[] considered_incomplete = new String[] {
 130         "if (t)",
 131         "if (t) { } else",
 132         "if (t) if (!t)",
 133         "if (match.kind == BRACES && (prevCT.kind == ARROW || prevCT.kind == NEW_MIDDLE))",
 134         "for (int i = 0; i < 10; ++i)",
 135         "while (os == null)",
 136     };
 137 
 138     static final String[] definitely_incomplete = new String[] {
 139         "int mm(",
 140         "int mm(int x",
 141         "int mm(int x)",
 142         "int mm(int x) {",
 143         "int mm(int x) {kll",
 144         "if",
 145         "if (",
 146         "if (t",


< prev index next >