コード例 #1
0
ファイル: MathUtilsTest.java プロジェクト: namihira-k/java8
  @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
ファイル: MathUtilsTest.java プロジェクト: namihira-k/java8
  @Test
  public void test_gcdWithRem_zero_negative() {
    // setup
    // - nothing

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

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