Merge branch 'master' into static_imports

This commit is contained in:
Sam Pottinger
2019-11-04 17:06:32 -08:00
69 changed files with 1489 additions and 2187 deletions

View File

@@ -88,8 +88,12 @@ public class ParserTests {
}
static void expectGood(final String id, boolean ignoreWhitespace) {
expectGood(id, ignoreWhitespace, Optional.empty());
}
static void expectGood(final String id, boolean ignoreWhitespace, Optional<String> packageName) {
try {
final String program = preprocess(id, res(id + ".pde"));
final String program = preprocess(id, res(id + ".pde"), packageName);
boolean successful = compile(id, program);
if (!successful) {
System.err.println("----------------------------");
@@ -369,6 +373,11 @@ public class ParserTests {
expectGood("typeinference");
}
@Test
public void testPackage() {
expectGood("packageTest", true, Optional.of("test.subtest"));
}
private static boolean compile(String id, String program) {
// Create compilable AST to get syntax problems
CompilationUnit compilableCU = JdtCompilerUtil.makeAST(