Skip to content

Commit e75cfaf

Browse files
author
jdf
committed
Created a simple compiler utility for compiling single compilation units. Regression tests now compare preprocessor output to canonical output, and also compile the result to check at least that the syntax is sensible!
1 parent bcaadc0 commit e75cfaf

File tree

16 files changed

+398
-16
lines changed

16 files changed

+398
-16
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import processing.core.*;
2+
import processing.xml.*;
3+
4+
import java.io.StringWriter;
5+
6+
import java.applet.*;
7+
import java.awt.Dimension;
8+
import java.awt.Frame;
9+
import java.awt.event.MouseEvent;
10+
import java.awt.event.KeyEvent;
11+
import java.awt.event.FocusEvent;
12+
import java.awt.Image;
13+
import java.io.*;
14+
import java.net.*;
15+
import java.text.*;
16+
import java.util.*;
17+
import java.util.zip.*;
18+
import java.util.regex.*;
19+
20+
public class bug1511 extends PApplet {
21+
public void setup() {
22+
// \u00df
23+
24+
/**
25+
* a
26+
*/
27+
28+
29+
noLoop();
30+
}
31+
static public void main(String args[]) {
32+
PApplet.main(new String[] { "--bgcolor=null", "bug1511" });
33+
}
34+
}

app/test/resources/bug1511.pde

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
* a
55
*/
66

7-
import processing.pdf.*;
7+
import java.io.StringWriter;
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import processing.core.*;
2+
import processing.xml.*;
3+
4+
import java.io.StringWriter;
5+
6+
import java.applet.*;
7+
import java.awt.Dimension;
8+
import java.awt.Frame;
9+
import java.awt.event.MouseEvent;
10+
import java.awt.event.KeyEvent;
11+
import java.awt.event.FocusEvent;
12+
import java.awt.Image;
13+
import java.io.*;
14+
import java.net.*;
15+
import java.text.*;
16+
import java.util.*;
17+
import java.util.zip.*;
18+
import java.util.regex.*;
19+
20+
public class bug1514a extends PApplet {
21+
public void setup() {
22+
//----- \u00e8\u00e9\u00e9\u00e8\u00e8\u00e9\u00e9\u00e9\u00e0\u00e9\u00e9\u00e8\u00e9''\u00e9\u00e9\u00e9
23+
//----------------------------------------------------------------
24+
//--- IMPORTS
25+
//----------------------------------------------------------------
26+
27+
noLoop();
28+
}
29+
static public void main(String args[]) {
30+
PApplet.main(new String[] { "--bgcolor=null", "bug1514a" });
31+
}
32+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
//----------------------------------------------------------------
33
//--- IMPORTS
44
//----------------------------------------------------------------
5-
import ddf.minim.*;
5+
import java.io.StringWriter;
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import processing.core.*;
2+
import processing.xml.*;
3+
4+
import java.io.StringWriter;
5+
6+
import java.applet.*;
7+
import java.awt.Dimension;
8+
import java.awt.Frame;
9+
import java.awt.event.MouseEvent;
10+
import java.awt.event.KeyEvent;
11+
import java.awt.event.FocusEvent;
12+
import java.awt.Image;
13+
import java.io.*;
14+
import java.net.*;
15+
import java.text.*;
16+
import java.util.*;
17+
import java.util.zip.*;
18+
import java.util.regex.*;
19+
20+
public class bug1514b extends PApplet {
21+
public void setup() {
22+
//----- \u00e8\u00e9\u00e9\u00e8\u00e8\u00e9\u00e9\u00e9\u00e0\u00e9\u00e9\u00e8\u00e9''\u00e9\u00e9
23+
//----------------------------------------------------------------
24+
//--- IMPORTS
25+
//----------------------------------------------------------------
26+
27+
noLoop();
28+
}
29+
static public void main(String args[]) {
30+
PApplet.main(new String[] { "--bgcolor=null", "bug1514b" });
31+
}
32+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
//----------------------------------------------------------------
33
//--- IMPORTS
44
//----------------------------------------------------------------
5-
import ddf.minim.*;
5+
import java.io.StringWriter;
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import processing.core.*;
2+
import processing.xml.*;
3+
4+
import java.util.ArrayList;
5+
import java.util.List;
6+
7+
import java.applet.*;
8+
import java.awt.Dimension;
9+
import java.awt.Frame;
10+
import java.awt.event.MouseEvent;
11+
import java.awt.event.KeyEvent;
12+
import java.awt.event.FocusEvent;
13+
import java.awt.Image;
14+
import java.io.*;
15+
import java.net.*;
16+
import java.text.*;
17+
import java.util.*;
18+
import java.util.zip.*;
19+
import java.util.regex.*;
20+
21+
public class bug1518a extends PApplet {
22+
23+
24+
25+
26+
public void setup()
27+
{
28+
List<String> list = new ArrayList<String>();
29+
list.add("foo");
30+
list.add("bar");
31+
list.add("baz");
32+
33+
binarySearch(list, "bar");
34+
}
35+
36+
static <T> int binarySearch(List<? extends Comparable<? super T>> list, T
37+
key) {
38+
return 0;
39+
}
40+
static public void main(String args[]) {
41+
PApplet.main(new String[] { "--bgcolor=null", "bug1518a" });
42+
}
43+
}

app/test/resources/bug1518a.pde

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import java.util.ArrayList;
2+
import java.util.List;
3+
4+
void setup()
5+
{
6+
List<String> list = new ArrayList<String>();
7+
list.add("foo");
8+
list.add("bar");
9+
list.add("baz");
10+
11+
binarySearch(list, "bar");
12+
}
13+
14+
static <T> int binarySearch(List<? extends Comparable<? super T>> list, T
15+
key) {
16+
return 0;
17+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import processing.core.*;
2+
import processing.xml.*;
3+
4+
import java.util.ArrayList;
5+
import java.util.List;
6+
7+
import java.applet.*;
8+
import java.awt.Dimension;
9+
import java.awt.Frame;
10+
import java.awt.event.MouseEvent;
11+
import java.awt.event.KeyEvent;
12+
import java.awt.event.FocusEvent;
13+
import java.awt.Image;
14+
import java.io.*;
15+
import java.net.*;
16+
import java.text.*;
17+
import java.util.*;
18+
import java.util.zip.*;
19+
import java.util.regex.*;
20+
21+
public class bug1518b extends PApplet {
22+
23+
24+
25+
26+
public void setup()
27+
{
28+
List<String> list = new ArrayList<String>();
29+
list.add("foo");
30+
list.add("bar");
31+
list.add("baz");
32+
}
33+
34+
static <T> int binarySearch(List<? extends Comparable<? super T>> list, T
35+
key) {
36+
return 0;
37+
}
38+
static public void main(String args[]) {
39+
PApplet.main(new String[] { "--bgcolor=null", "bug1518b" });
40+
}
41+
}

app/test/resources/bug1518b.pde

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import java.util.ArrayList;
2+
import java.util.List;
3+
4+
void setup()
5+
{
6+
List<String> list = new ArrayList<String>();
7+
list.add("foo");
8+
list.add("bar");
9+
list.add("baz");
10+
}
11+
12+
static <T> int binarySearch(List<? extends Comparable<? super T>> list, T
13+
key) {
14+
return 0;
15+
}

0 commit comments

Comments
 (0)