o
    1&i                     @   sb   d dl Z d dlZd dlmZ d dlmZ dd ZG dd dejZe	  e
dkr/e  dS dS )	    N)njit)typesc                    s    fdd}|S )Nc                    s,   dd }t  |}| |dd d S )Nc                 S   s   | }|S )N )xyr   r   CC:\wamp64\www\opt\env\Lib\site-packages\numba/tests/test_numconv.pycast	   s   z'template.<locals>.closure.<locals>.cast   )r   ZassertAlmostEqual)selfr   Zcfuncfromtytotyr   r   closure   s   ztemplate.<locals>.closurer   )r   r   r   r   r   r   template   s   r   c                   @   s   e Zd ZdZedd ZdS )TestNumberConversionz
    Test all int/float numeric conversion to ensure we have all the external
    dependencies to perform these conversions.
    c                 C   sH   t jt jB }tj|ddD ]\}}dj||d}t| |t|| qd S )N   )rztest_{fromty}_to_{toty}r   )r   Zinteger_domainZreal_domain	itertoolspermutationsformatsetattrr   )clsZtysr   r   Z	test_namer   r   r   automatic_populate   s   z'TestNumberConversion.automatic_populateN)__name__
__module____qualname____doc__classmethodr   r   r   r   r   r      s    r   __main__)r   ZunittestZnumbar   Z
numba.corer   r   ZTestCaser   r   r   mainr   r   r   r   <module>   s    