mirror of
https://github.com/processing/processing4.git
synced 2026-01-30 11:51:54 +01:00
Fix size call with equation.
This commit is contained in:
@@ -50,6 +50,22 @@ public class ParserTests {
|
||||
}
|
||||
}
|
||||
|
||||
static void expectRunnerException(final String id) {
|
||||
try {
|
||||
preprocess(id, res(id + ".pde"));
|
||||
fail("Expected to fail");
|
||||
} catch (SketchException e) {
|
||||
assertNotNull(e);
|
||||
} catch (PdePreprocessIssueException e) {
|
||||
assertNotNull(e.getIssue().getMsg());
|
||||
} catch (Exception e) {
|
||||
if (!e.equals(e.getCause()) && e.getCause() != null)
|
||||
fail(e.getCause().toString());
|
||||
else
|
||||
fail(e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
static void expectRunnerException(final String id,
|
||||
final int expectedLine) {
|
||||
|
||||
@@ -453,4 +469,19 @@ public class ParserTests {
|
||||
expectGood("customrootclass");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testExpessionSize() {
|
||||
expectGood("expressionsize");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testExpessionSizeMethod() {
|
||||
expectRunnerException("expressionsizemethod");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testExpessionSizeVar() {
|
||||
expectRunnerException("expressionsizevar");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user