o
    i                     @   s   d dl Z d dlZd dlZd dlmZmZmZmZmZm	Z	m
Z
 d dlmZ edZedZejdd dkZG dd	 d	eZed
krGe  dS dS )    N)Constant	FloatType
DoubleTypeLiteralStructTypeIntType	ArrayTypeHalfType)TestCase         )      c                   @   s@   e Zd Zdd Zdd Zeeddd Zdd	 Z	d
d Z
dS )TestValueReprc                    8    fdd}|t jd |tdd |tdd d S )Nc                        t t | } t|| d S N)r   r   assertEqualstrvalexpectedcself l/var/www/html/eduruby.in/lip-sync/lip-sync-env/lib/python3.10/site-packages/llvmlite/tests/test_valuerepr.py
check_repr      z2TestValueRepr.test_double_repr.<locals>.check_reprzdouble 0x400921fb54442d18infzdouble 0x7ff0000000000000-infzdouble 0xfff0000000000000mathpifloatr   r   r   r   r   test_double_repr      zTestValueRepr.test_double_reprc                    r   )Nc                    r   r   )r   r   r   r   r   r   r   r   r      r   z1TestValueRepr.test_float_repr.<locals>.check_reprzfloat 0x400921fb60000000r   zfloat 0x7ff0000000000000r    zfloat 0xfff0000000000000r!   r%   r   r   r   test_float_repr   r'   zTestValueRepr.test_float_reprz
py36+ onlyc                    r   )Nc                    r   r   )r   r   r   r   r   r   r   r   r   &   r   z0TestValueRepr.test_half_repr.<locals>.check_reprzhalf 0x4009200000000000r   zhalf 0x7ff0000000000000r    zhalf 0xfff0000000000000r!   r%   r   r   r   test_half_repr$   s   zTestValueRepr.test_half_reprc                 C   s:   t ttg}t|ttdttdf}| t|d d S )Nd   i  z{i8, i16} {i8 100, i16 1000})r   int8int16r   r   r   )r   tpr   r   r   r   test_struct_repr-   s   zTestValueRepr.test_struct_reprc                 C   sT   t td}dd dD }t||}| t|d t|td}| t|d d S )Nr   c                 S   s   g | ]}t t|qS r   )r   r+   ).0xr   r   r   
<listcomp>4   s    z1TestValueRepr.test_array_repr.<locals>.<listcomp>)   
   iz[3 x i8] [i8 5, i8 10, i8 -15]s   z[3 x i8] c"\01\02\03")r   r+   r   r   r   	bytearray)r   r-   valuesr   r   r   r   test_array_repr2   s   

zTestValueRepr.test_array_reprN)__name__
__module____qualname__r&   r(   unittestZ
skipUnlessPY36_OR_LATERr)   r.   r6   r   r   r   r   r      s    

r   __main__)r"   sysr:   Zllvmlite.irr   r   r   r   r   r   r   Zllvmlite.testsr	   r+   r,   version_infor;   r   r7   mainr   r   r   r   <module>   s    $)