def test_multiplier_exact(self): c1 = Cell(content=Supported(3)) c2 = Cell(content=Supported(4)) c3 = Cell() multiplier(c1, c2, c3) scheduler.run() self.assertEqual(c3.content, Supported(12))
def test_multiplier_interval(self): c1 = Cell(content=Supported(Interval(3, 4))) c2 = Cell(content=Supported(Interval(5, 6))) c3 = Cell() multiplier(c1, c2, c3) scheduler.run() self.assertEqual(c3.content, Supported(Interval(15, 24)))
def test_integer(self): a = Cell() b = Cell() c = Cell() multiplier(a, b, c) a.add_content(5) b.add_content(3) scheduler.run() self.assertEqual(c.content, 15)