Files
JavaScript/Maths/test/GetEuclidGCD.test.js
merelymyself c81db629b8 merge: EuclidGCD: add tests (#994)
test was not present beforehand.
2022-04-22 16:21:22 +05:30

13 lines
305 B
JavaScript

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)