15 lines
558 B
Python
15 lines
558 B
Python
|
from unittest import TestCase
|
||
|
from benchmark.gcd import gcd
|
||
|
|
||
|
|
||
|
class Test_gcd(TestCase):
|
||
|
# distances_true = {1: [182], 2: [931], 3: [749], 4: [0], 5: [0, 0, 0, 0, 0, 1]}
|
||
|
# distances_false = {1: [0], 2: [0], 3: [0], 4: [749], 5: [183, 17, 13, 4, 1, 0]}
|
||
|
def test_gcd_1(self):
|
||
|
assert gcd(a=183, b=932) == 1
|
||
|
|
||
|
# distances_true = {1: [720], 2: [503], 3: [217], 4: [218], 5: [0, 0, 0, 0, 1]}
|
||
|
# distances_false = {1: [0], 2: [0], 3: [0], 4: [0], 5: [504, 217, 70, 7, 0]}
|
||
|
def test_gcd_2(self):
|
||
|
assert gcd(a=721, b=504) == 7
|