U
    ,d                     @   sd   d dl Z d dlmZmZ d dlmZ e Zde_e Zdd Z	G dd de j
Zed	kr`e   dS )
    N)compile_isolatedFlags)typesTc                 C   s   | | S )N )abr   r   ?/tmp/pip-unpacked-wheel-eu7e0c37/numba/tests/test_python_int.py
return_int   s    r	   c                   @   sZ   e Zd ZeejdfddZdd ZefddZdd	 Z	efd
dZ
dd ZefddZdS )TestPythonInt)      c           	      C   sP   t }t|||f|d}|j}|| }|| }| t|t| | || d S N)flags)r	   r   Zentry_pointZassertIstypeassertEqual)	selfr   int_typeoperandsZpyfuncZcrZcfuncexpectedgotr   r   r   test_int_return_type   s    z"TestPythonInt.test_int_return_typec                 C   s   | j td d S r   )r   no_pyobj_flagsr   r   r   r   test_int_return_type_npm   s    z&TestPythonInt.test_int_return_type_npmc                 C   s   | j tj|d d S )N)r   r   )r   r   Zuint64r   r   r   r   r   test_unsigned_int_return_type"   s    z+TestPythonInt.test_unsigned_int_return_typec                 C   s   | j td d S r   )r   r   r   r   r   r   !test_unsigned_int_return_type_npm%   s    z/TestPythonInt.test_unsigned_int_return_type_npmc                 C   s   | j |dd d S )N)l        l        r   r   r   r   r   r   r   test_long_int_return_type(   s    z'TestPythonInt.test_long_int_return_typec                 C   s   | j td d S r   )r   r   r   r   r   r   test_long_int_return_type_npm-   s    z+TestPythonInt.test_long_int_return_type_npmc                 C   s   | j |dd dd fd d S )N   F   K   r   r   r   r   r   r   test_longer_int_return_type0   s    z)TestPythonInt.test_longer_int_return_typeN)__name__
__module____qualname__force_pyobj_flagsr   Zint64r   r   r   r   r   r    r$   r   r   r   r   r
      s    

r
   __main__)ZunittestZnumba.core.compilerr   r   Z
numba.corer   r(   Zforce_pyobjectr   r	   ZTestCaser
   r%   mainr   r   r   r   <module>   s   %