summaryrefslogtreecommitdiffstats
path: root/tests/pureJava/DivOpMustHappen.java
blob: 91a2fd0a3be87987c2db092ab944e662a1d56219 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import org.aspectj.testing.Tester;

public class DivOpMustHappen {
    static int i = 0;
    static int j = 1;

    public static void main(String[] args) {
	boolean threw = false;
	try {
	    switch(j / i) {}
	} catch (Exception e) {
	    threw = true;
	}
	Tester.check(threw, "didn't throw divbyzero exception");
    }
}