Exemple #1
0
  @Test
  public void test_gcdWithFloorMod_a_b_negative() {
    // setup
    // - nothing

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

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

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

    // check
    assertEquals(VALUE_ANSWER, result);
  }