Dare I say... moar tests!?

This commit is contained in:
jdf
2010-03-18 02:14:47 +00:00
parent 9155886c93
commit 0f02b70fee
5 changed files with 63 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
void setup() {
if (1 == 2) {
println("the impossible just happened");
}
} else {
println("zzz");
}
}
+1
View File
@@ -0,0 +1 @@
println("hello");/println("world");
+32
View File
@@ -0,0 +1,32 @@
import processing.core.*;
import processing.xml.*;
import java.applet.*;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.event.MouseEvent;
import java.awt.event.KeyEvent;
import java.awt.event.FocusEvent;
import java.awt.Image;
import java.io.*;
import java.net.*;
import java.text.*;
import java.util.*;
import java.util.zip.*;
import java.util.regex.*;
public class bug631 extends PApplet {
public void setup() {
firstLoop:
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
if ((i+j) % 5 != 0) continue firstLoop;
System.out.println(i + " " + j);
}
}
noLoop();
}
static public void main(String args[]) {
PApplet.main(new String[] { "--bgcolor=null", "bug631" });
}
}
+7
View File
@@ -0,0 +1,7 @@
firstLoop:
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
if ((i+j) % 5 != 0) continue firstLoop;
System.out.println(i + " " + j);
}
}
@@ -147,6 +147,11 @@ public class ParserTests {
expectGood("bug5b");
}
@Test
public void bug6() {
expectRecognitionException("bug6", "expecting EOF, found '/'", 1);
}
@Test
public void bug16() {
expectRunnerException("bug16", "Unclosed /* comment */", 2);
@@ -173,6 +178,16 @@ public class ParserTests {
expectGood("bug481");
}
@Test
public void bug507() {
expectRecognitionException("bug507", "expecting EOF, found 'else'", 5);
}
@Test
public void bug631() {
expectGood("bug631");
}
@Test
public void bug1511() {
expectGood("bug1511");