This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
kse-02/fuzzer_tests/test_gcd.py

29 lines
1,010 B
Python

from unittest import TestCase
from benchmark.gcd import gcd
class Test_gcd(TestCase):
# distances_true = {1: [0]}
# distances_false = {1: [1]}
def test_gcd_1(self):
assert gcd(a=1, b=751) == 1
# distances_true = {1: [964], 2: [964], 3: [0]}
# distances_false = {1: [0], 2: [0], 3: [1]}
def test_gcd_2(self):
assert gcd(a=965, b=965) == 965
# distances_true = {1: [700], 2: [440], 3: [260], 4: [261], 5: [0, 0, 0, 0, 0, 0, 0, 0, 1]}
# distances_false = {1: [0], 2: [0], 3: [0], 4: [0], 5: [441, 260, 181, 79, 23, 10, 3, 1, 0]}
def test_gcd_3(self):
assert gcd(a=701, b=441) == 1
# distances_true = {1: [941], 2: [944], 3: [3], 4: [0], 5: [0, 0, 1]}
# distances_false = {1: [0], 2: [0], 3: [0], 4: [3], 5: [942, 3, 0]}
def test_gcd_4(self):
assert gcd(a=942, b=945) == 3
# distances_true = {1: [354], 2: [0]}
# distances_false = {1: [0], 2: [1]}
def test_gcd_5(self):
assert gcd(a=355, b=1) == 1