Skip to content

Commit d30d34c

Browse files
committed
Added test for smooth on static for good measure.
1 parent 721046b commit d30d34c

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

java/test/processing/mode/java/ParserTests.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,4 +380,9 @@ public void testSmoothWithParam() {
380380
expectGood("smoothparam");
381381
}
382382

383+
@Test
384+
public void testSmoothWithParamStatic() {
385+
expectGood("smoothparamstatic");
386+
}
387+
383388
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import processing.core.*;
2+
import processing.data.*;
3+
import processing.event.*;
4+
import processing.opengl.*;
5+
6+
import java.util.HashMap;
7+
import java.util.ArrayList;
8+
import java.io.File;
9+
import java.io.BufferedReader;
10+
import java.io.PrintWriter;
11+
import java.io.InputStream;
12+
import java.io.OutputStream;
13+
import java.io.IOException;
14+
15+
public class smoothparamstatic extends PApplet {
16+
17+
public void setup() {
18+
/* size commented out by preprocessor */;
19+
/* smooth commented out by preprocessor */;
20+
background(0);
21+
fill(255,0,0);
22+
ellipse(100,100,100,100);
23+
fill(0,255,0);
24+
ellipse(150,150,100,100);
25+
26+
noLoop();
27+
}
28+
29+
public void settings() { size(300, 300, P2D);
30+
smooth(4); }
31+
32+
static public void main(String[] passedArgs) {
33+
String[] appletArgs = new String[] { "smoothparamstatic" };
34+
if (passedArgs != null) {
35+
PApplet.main(concat(appletArgs, passedArgs));
36+
} else {
37+
PApplet.main(appletArgs);
38+
}
39+
}
40+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
size(300,300, P2D);
2+
smooth(4);
3+
background(0);
4+
fill(255,0,0);
5+
ellipse(100,100,100,100);
6+
fill(0,255,0);
7+
ellipse(150,150,100,100);

0 commit comments

Comments
 (0)