1.1 --- a/rt/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/IntegerArithmeticTest.java Tue Feb 26 16:54:16 2013 +0100
1.2 +++ b/rt/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/IntegerArithmeticTest.java Tue Apr 02 15:40:51 2013 +0200
1.3 @@ -50,6 +50,14 @@
1.4 private static int neg(int x) {
1.5 return (-x);
1.6 }
1.7 +
1.8 + private static float fadd(float x, float y) {
1.9 + return x + y;
1.10 + }
1.11 +
1.12 + private static double dadd(double x, double y) {
1.13 + return x + y;
1.14 + }
1.15
1.16 @Compare public int addOverflow() {
1.17 return add(Integer.MAX_VALUE, 1);
1.18 @@ -90,7 +98,7 @@
1.19 @Compare public int division() {
1.20 return div(1, 2);
1.21 }
1.22 -
1.23 +
1.24 @Compare public int divisionReminder() {
1.25 return mod(1, 2);
1.26 }
1.27 @@ -103,6 +111,14 @@
1.28 return mod(-7, 3);
1.29 }
1.30
1.31 + @Compare public int conversionFromFloat() {
1.32 + return (int) fadd(-2, -0.6f);
1.33 + }
1.34 +
1.35 + @Compare public int conversionFromDouble() {
1.36 + return (int) dadd(-2, -0.6);
1.37 + }
1.38 +
1.39 @Compare public boolean divByZeroThrowsArithmeticException() {
1.40 try {
1.41 div(1, 0);