merge: EuclidGCD: add tests (#994)

test was not present beforehand.
This commit is contained in:
merelymyself
2022-04-22 18:51:22 +08:00
committed by GitHub
parent 9513bcd77a
commit c81db629b8

View File

@ -0,0 +1,12 @@
import { GetEuclidGCD } from '../GetEuclidGCD'
function testEuclidGCD (n, m, expected) {
test('Testing on ' + n + ' and ' + m + '!', () => {
expect(GetEuclidGCD(n, m)).toBe(expected)
})
}
testEuclidGCD(5, 20, 5)
testEuclidGCD(109, 902, 1)
testEuclidGCD(290, 780, 10)
testEuclidGCD(104, 156, 52)