예제 #1
0
  @Test
  public void test_gcdWithRem_b_negative_asc() {
    // setup
    // - nothing

    // action
    final int result = MathUtils.gcdWithRem(VALUE_2, -VALUE_1);

    // check
    assertEquals(VALUE_ANSWER, result);
  }
예제 #2
0
  @Test
  public void test_gcdWithRem_zero_negative() {
    // setup
    // - nothing

    // action
    final int result = MathUtils.gcdWithRem(-VALUE_ANSWER, 0);

    // check
    assertEquals(-VALUE_ANSWER, result);
  }