Code example for BigInteger

Methods: divide

0
    public void testCase1() { 
        byte aBytes[] = {1, 2, 3, 4, 5, 6, 7};
        byte bBytes[] = {0};
        int aSign = 1;
        int bSign = 0;        
        BigInteger aNumber = new BigInteger(aSign, aBytes);
        BigInteger bNumber = new BigInteger(bSign, bBytes);
        try { 
            aNumber.divide(bNumber);
            fail("ArithmeticException has not been caught");
        } catch (ArithmeticException e) {
            assertEquals("Improper exception message", "BigInteger divide by zero", e.getMessage());
        } 
    } 
 
    /** 
     * Divide by ZERO 
     */ 
    public void testCase2() { 
        byte aBytes[] = {1, 2, 3, 4, 5, 6, 7};
        int aSign = 1;