Skip to content

Commit c81db62

Browse files
authored
merge: EuclidGCD: add tests (#994)
test was not present beforehand.
1 parent 9513bcd commit c81db62

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Maths/test/GetEuclidGCD.test.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { GetEuclidGCD } from '../GetEuclidGCD'
2+
3+
function testEuclidGCD (n, m, expected) {
4+
test('Testing on ' + n + ' and ' + m + '!', () => {
5+
expect(GetEuclidGCD(n, m)).toBe(expected)
6+
})
7+
}
8+
9+
testEuclidGCD(5, 20, 5)
10+
testEuclidGCD(109, 902, 1)
11+
testEuclidGCD(290, 780, 10)
12+
testEuclidGCD(104, 156, 52)

0 commit comments

Comments
 (0)