import unittest

from utils import run_file


class TestPower(unittest.TestCase):
    def test_po_power(self):
        self.power("PO")

    def test_cs_power(self):
        self.power("CO")

    def power(self, mode):
        self.assertTrue(run_file(["power.alc", "primitives.alc"],
            [1, 0, 2, 1, 5, 0, 2, 2, 3, 2, 10, 2, 10, 10],
            [1, 2, 1, 4, 9, 100, 10000000000], mode))
