mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Dare I say... moar tests!?
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
void setup() {
|
||||
if (1 == 2) {
|
||||
println("the impossible just happened");
|
||||
}
|
||||
} else {
|
||||
println("zzz");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
println("hello");/println("world");
|
||||
@@ -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" });
|
||||
}
|
||||
}
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user