import unittest

from utils import run_file


class TestFibonacciSmart(unittest.TestCase):
    def test_po_fibonacci_smart(self):
        self.fibonacci_smart("PO")

    def test_co_fibonacci_smart(self):
        self.fibonacci_smart("CO")

    def fibonacci_smart(self, mode):
        self.assertTrue(run_file(["fibonacci_smart.alc", "primitives.alc"],
            [1, 2, 3, 4, 5, 6, 7, 8],
            ["1", "1", "2", "3", "5", "8", "13", "21"],
            mode))
