

def test_float_to_int(self):
    pyfunc = float_to_int
    cr = compile_isolated(pyfunc, [types.float32])
    cfunc = cr.entry_point
    self.assertEqual(cr.signature.return_type, types.int32)
    self.assertEqual(cfunc(12.3), pyfunc(12.3))
    self.assertEqual(cfunc(12.3), int(12.3))
    self.assertEqual(cfunc((- 12.3)), pyfunc((- 12.3)))
    self.assertEqual(cfunc((- 12.3)), int((- 12.3)))

dataset/ETHPy150Open numba/numba/numba/tests/test_casting.py TestCasting.test_float_to_int/original