public void testCase12(){
  byte bBytes[]={15,48,-29,7,98,-1,39,-128};
  int bSign=-1;
  byte rBytes[]={0};
  BigInteger aNumber=BigInteger.ZERO;
  BigInteger bNumber=new BigInteger(bSign,bBytes);
  BigInteger result=aNumber.divide(bNumber);
  byte resBytes[]=new byte[rBytes.length];
  resBytes=result.toByteArray();
  for (int i=0; i < resBytes.length; i++) {
    assertTrue(resBytes[i] == rBytes[i]);
  }
  assertEquals("incorrect sign",0,result.signum());
}

public void testCase12 ( ) { byte bBytes [ ] = { 15 , 48 , - 29 , 7 , 98 , - 1 , 39 , - 128 } ; int bSign = - 1 ; byte rBytes [ ] = { 0 } ; BigInteger aNumber = BigInteger . ZERO ; BigInteger bNumber = new BigInteger ( bSign , bBytes ) ; BigInteger result = aNumber . divide ( bNumber ) ; byte resBytes [ ] = new byte [ rBytes . length ] ; resBytes = result . toByteArray ( ) ; for ( int i = 0 ; i < resBytes . length ; i ++ ) { assertTrue ( resBytes [ i ] == rBytes [ i ] ) ; } assertEquals ( "incorrect sign" , 0 , result . signum ( ) ) ; }
divide zero by a negative number .
