Example #1
0
 def test_adder_exact(self):
     c1 = Cell(content=Supported(3))
     c2 = Cell(content=Supported(4))
     c3 = Cell()
     adder(c1, c2, c3)
     scheduler.run()
     self.assertEqual(c3.content, Supported(7))
Example #2
0
    def test_str(self):
        a = Cell()
        b = Cell()
        c = Cell()

        adder(a, b, c)

        a.add_content('15')
        b.add_content('13')

        scheduler.run()

        self.assertEqual(c.content, '1513')
Example #3
0
    def test_float(self):
        a = Cell()
        b = Cell()
        c = Cell()

        adder(a, b, c)

        a.add_content(1.5)
        b.add_content(1.3)

        scheduler.run()

        self.assertEqual(c.content, 2.8)
Example #4
0
    def test_integer(self):
        a = Cell()
        b = Cell()
        c = Cell()

        adder(a, b, c)

        a.add_content(15)
        b.add_content(13)

        scheduler.run()

        self.assertEqual(c.content, 28)
Example #5
0
    def test_str(self):
        a = Cell()
        b = Cell()
        c = Cell()

        adder(a, b, c)

        a.add_content('15')
        b.add_content('13')

        scheduler.run()

        self.assertEqual(c.content, '1513')
Example #6
0
    def test_float(self):
        a = Cell()
        b = Cell()
        c = Cell()

        adder(a, b, c)

        a.add_content(1.5)
        b.add_content(1.3)

        scheduler.run()

        self.assertEqual(c.content, 2.8)
Example #7
0
    def test_integer(self):
        a = Cell()
        b = Cell()
        c = Cell()

        adder(a, b, c)

        a.add_content(15)
        b.add_content(13)

        scheduler.run()

        self.assertEqual(c.content, 28)