Remove main function from GCD class (#5828)

This commit is contained in:
Tanmay Singh
2024-10-22 23:34:00 +05:30
committed by GitHub
parent ef72b1e40b
commit 0bb22fbc7d
2 changed files with 22 additions and 11 deletions

View File

@ -40,6 +40,11 @@ public class GCDTest {
Assertions.assertEquals(GCD.gcd(9, 6), 3);
}
@Test
void test8() {
Assertions.assertEquals(GCD.gcd(48, 18, 30, 12), 6);
}
@Test
void testArrayGcd1() {
Assertions.assertEquals(GCD.gcd(new int[] {9, 6}), 3);