Exemplo n.º 1
0
 def test_number_transforms_integer_numbers_to_floats(self):
     h = HaxeTransformer()
     for num in (0, 9999, -19232):
         node = [Token("DEC_NUMBER", '{}'.format(num))]
         output = h.number(node)
         self.assertEqual(num, output)
Exemplo n.º 2
0
 def test_number_transforms_decimal_numbers_to_floats(self):
     for num in (0.0, 17.021, -183.123456):
         h = HaxeTransformer()
         node = [Token("DEC_NUMBER", '{}'.format(num))]
         output = h.number(node)
         self.assertEqual(num, output)