mirror of
https://github.com/processing/processing4.git
synced 2026-03-27 06:47:50 +01:00
Merge branch 'master' into static_imports
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user