a
    b	                     @   s8   d dl mZ G dd deZedkr4d dlZe  dS )    )
CythonTestc                   @   sl   e Zd Zdd Zdd Zdd Zdd Zd	d
 Zdd Zdd Z	dd Z
dd Zdd Zdd Zdd ZdS )TestCodeWriterc                 C   s   |  || |j d S )N)Z
assertCodefragmentroot)selfZcodestr r   k/Users/vegardjervell/Documents/master/model/venv/lib/python3.9/site-packages/Cython/Tests/TestCodeWriter.pyt   s    zTestCodeWriter.tc                 C   s   |  d d S )Nzw
                    print x, y
                    print x + y ** 2
                    print x, y, z,
               r	   r   r   r   r   
test_print   s    zTestCodeWriter.test_printc                 C   s   |  d d S )Nzif x:
    passr
   r   r   r   r   test_if   s    zTestCodeWriter.test_ifc                 C   s   |  d d S )Na   
                    if x:
                        pass
                    elif y:
                        pass
                    elif z + 34 ** 34 - 2:
                        pass
                    else:
                        pass
                r
   r   r   r   r   test_ifelifelse   s    zTestCodeWriter.test_ifelifelsec                 C   s   |  d d S )Nz
                    def f(x, y, z):
                        pass
                    def f(x = 34, y = 54, z):
                        pass
               r
   r   r   r   r   test_def*   s    zTestCodeWriter.test_defc                 C   s   |  d d S )Nz8def f(unsigned long long long long long int y):
    passr
   r   r   r   r   test_longness_and_signedness2   s    z+TestCodeWriter.test_longness_and_signednessc                 C   s   |  d d S )Nz#def f(signed short int y):
    passr
   r   r   r   r   test_signed_short5   s    z TestCodeWriter.test_signed_shortc                 C   s   |  d d S )Nz+def f(int x, unsigned long int y):
    passr
   r   r   r   r   test_typed_args8   s    zTestCodeWriter.test_typed_argsc                 C   s   |  d d S )Nzh
                    cdef int hello
                    cdef int hello = 4, x = 3, y, z
                r
   r   r   r   r   test_cdef_var;   s    zTestCodeWriter.test_cdef_varc                 C   s   |  d d S )Nz
                    for x, y, z in f(g(h(34) * 2) + 23):
                        print x, y, z
                    else:
                        print 43
                r
   r   r   r   r   test_for_loopA   s    zTestCodeWriter.test_for_loopc                 C   s   |  d d S )Nzx += 43r
   r   r   r   r   test_inplace_assignmentI   s    z&TestCodeWriter.test_inplace_assignmentc                 C   s   |  d d S )Nza.xr
   r   r   r   r   test_attributeL   s    zTestCodeWriter.test_attributeN)__name__
__module____qualname__r	   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r      s   r   __main__N)ZCython.TestUtilsr   r   r   Zunittestmainr   r   r   r   <module>   s   L