import unittest

from utils import run_file


class TestRemainder(unittest.TestCase):
    def test_po_remainder(self):
        self.remainder("PO")

    def test_cs_remainder(self):
        self.remainder("CO")

    def remainder(self, mode):
        self.assertTrue(run_file(["remainder.alc", "primitives.alc"],
            [(1, 2), (20, 2), (99, 100), (17, 3)],
            ["1", "0", "99", "2"], mode))
