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_zellers_birthday.py

25 lines
1.2 KiB
Python
Raw Normal View History

2023-12-24 13:55:34 +00:00
from unittest import TestCase
from benchmark.zellers_birthday import zeller
class Test_zeller(TestCase):
# distances_true = {1: [6], 2: [0], 3: [0], 4: [7], 5: [0], 6: [0], 7: [0], 8: [2, 1, 0]}
# distances_false = {1: [0], 2: [121], 3: [71], 4: [0], 5: [71], 6: [7], 7: [1], 8: [0, 0, 1]}
def test_zeller_1(self):
assert zeller(d=-26, m=133, y=29) == 'Tuesday'
# distances_true = {1: [0], 2: [0], 3: [0], 4: [0], 5: [1904], 7: [3], 8: [6, 5, 4, 3, 2, 1, 0]}
# distances_false = {1: [929], 2: [304], 3: [97], 4: [20], 5: [0], 7: [0], 8: [0, 0, 0, 0, 0, 0, 1]}
def test_zeller_2(self):
assert zeller(d=960, m=-316, y=-3) == 'Saturday'
# distances_true = {1: [0], 2: [0], 3: [0], 4: [74], 5: [0], 6: [0], 7: [0], 8: [3, 2, 1, 0]}
# distances_false = {1: [932], 2: [552], 3: [4], 4: [0], 5: [4], 6: [74], 7: [2], 8: [0, 0, 0, 1]}
def test_zeller_3(self):
assert zeller(d=963, m=-564, y=96) == 'Wednesday'
# distances_true = {1: [0], 2: [0], 3: [0], 4: [58], 5: [0], 6: [0], 7: [3], 8: [3, 2, 1, 0]}
# distances_false = {1: [492], 2: [988], 3: [20], 4: [0], 5: [20], 6: [58], 7: [0], 8: [0, 0, 0, 1]}
def test_zeller_4(self):
assert zeller(d=-523, m=-1000, y=80) == 'Wednesday'