diff options
Diffstat (limited to 'tests/pureJava/DivOpMustHappen.java')
-rw-r--r-- | tests/pureJava/DivOpMustHappen.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/pureJava/DivOpMustHappen.java b/tests/pureJava/DivOpMustHappen.java new file mode 100644 index 000000000..91a2fd0a3 --- /dev/null +++ b/tests/pureJava/DivOpMustHappen.java @@ -0,0 +1,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"); + } +} + |