vmtest/src/test/java/org/apidesign/bck2brwsr/tck/IntegerArithmeticTest.java
branchmodel
changeset 877 3392f250c784
parent 457 b0e82dcf51fb
child 737 b2731af0357d
     1.1 --- a/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/IntegerArithmeticTest.java	Tue Jan 15 12:26:19 2013 +0100
     1.2 +++ b/vmtest/src/test/java/org/apidesign/bck2brwsr/tck/IntegerArithmeticTest.java	Fri Mar 22 16:59:47 2013 +0100
     1.3 @@ -47,6 +47,10 @@
     1.4          return x % y;
     1.5      }
     1.6      
     1.7 +    private static int neg(int x) {
     1.8 +        return (-x);
     1.9 +    }
    1.10 +    
    1.11      @Compare public int addOverflow() {
    1.12          return add(Integer.MAX_VALUE, 1);
    1.13      }
    1.14 @@ -91,6 +95,18 @@
    1.15          return mod(1, 2);
    1.16      }
    1.17      
    1.18 +    @Compare public int negate() {
    1.19 +        return neg(123456);
    1.20 +    }
    1.21 +    
    1.22 +    @Compare public int negateMaxInt() {
    1.23 +        return neg(Integer.MAX_VALUE);
    1.24 +    }
    1.25 +    
    1.26 +    @Compare public int negateMinInt() {
    1.27 +        return neg(Integer.MIN_VALUE);
    1.28 +    }
    1.29 +    
    1.30      @Compare public int sumTwoDimensions() {
    1.31          int[][] matrix = createMatrix(4, 3);
    1.32          matrix[0][0] += 10;