Пример #1
0
 @Test
 public void testSubtractUByteInvalid() throws Exception {
   try {
     UByte.MIN.subtract(ubyte(1));
     fail();
   } catch (NumberFormatException e) {
   }
 }
Пример #2
0
  @Test
  public void testSubtractIntInvalid() throws Exception {
    try {
      UByte.MIN.subtract(1);
      fail();
    } catch (NumberFormatException e) {
    }

    try {
      UByte.MAX.subtract(-1);
      fail();
    } catch (NumberFormatException e) {
    }
  }
Пример #3
0
  @Test
  public void testAddIntInvalid() throws Exception {
    try {
      UByte.MAX.add(1);
      fail();
    } catch (NumberFormatException e) {
    }

    try {
      UByte.MIN.add(-1);
      fail();
    } catch (NumberFormatException e) {
    }
  }