1.1 --- a/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/IntegerArithmeticTest.java Thu Feb 07 17:41:41 2013 +0100
1.2 +++ b/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/IntegerArithmeticTest.java Fri Feb 15 16:06:12 2013 +0100
1.3 @@ -94,7 +94,33 @@
1.4 @Compare public int divisionReminder() {
1.5 return mod(1, 2);
1.6 }
1.7 -
1.8 +
1.9 + @Compare public int negativeDivision() {
1.10 + return div(-7, 3);
1.11 + }
1.12 +
1.13 + @Compare public int negativeDivisionReminder() {
1.14 + return mod(-7, 3);
1.15 + }
1.16 +
1.17 + @Compare public boolean divByZeroThrowsArithmeticException() {
1.18 + try {
1.19 + div(1, 0);
1.20 + return false;
1.21 + } catch (final ArithmeticException e) {
1.22 + return true;
1.23 + }
1.24 + }
1.25 +
1.26 + @Compare public boolean modByZeroThrowsArithmeticException() {
1.27 + try {
1.28 + mod(1, 0);
1.29 + return false;
1.30 + } catch (final ArithmeticException e) {
1.31 + return true;
1.32 + }
1.33 + }
1.34 +
1.35 @Compare public int negate() {
1.36 return neg(123456);
1.37 }