
    h                     ^    S SK Jr   " S S\5      r\S:X  a  S SKr\R
                  " 5         gg)    )
CythonTestc                   t    \ rS rSrS rS rS rS rS rS r	S r
S	 rS
 rS rS rS rS rS rS rS rSrg)TestCodeWriter   c                 X    U R                  XR                  U5      R                  5        g )N)
assertCodefragmentroot)selfcodestrs     U/var/www/fran/franai/venv/lib/python3.13/site-packages/Cython/Tests/TestCodeWriter.pytTestCodeWriter.t   s    w!7!<!<=    c                 &    U R                  S5        g )Nz
                    print(x + y ** 2)
                    print(x, y, z)
                    print(x + y, x + y * z, x * (y + z))
               r   r   s    r   
test_printTestCodeWriter.test_print   s      	r   c                 &    U R                  S5        g )Nzif x:
    passr   r   s    r   test_ifTestCodeWriter.test_if   s     !r   c                 &    U R                  S5        g )Na   
                    if x:
                        pass
                    elif y:
                        pass
                    elif z + 34 ** 34 - 2:
                        pass
                    else:
                        pass
                r   r   s    r   test_ifelifelseTestCodeWriter.test_ifelifelse   s     	 		r   c                 &    U R                  S5        g )Nz
                    def f(x, y, z):
                        pass
                    def f(x = 34, y = 54, z):
                        pass
               r   r   s    r   test_defTestCodeWriter.test_def*   s      	r   c                 &    U R                  S5        g )Na  
                    cdef f(x, y, z):
                        pass
                    cdef public void (x = 34, y = 54, z):
                        pass
                    cdef f(int *x, void *y, Value *z):
                        pass
                    cdef f(int **x, void **y, Value **z):
                        pass
                    cdef inline f(int &x, Value &z):
                        pass
               r   r   s    r   	test_cdefTestCodeWriter.test_cdef2   s      	r   c                 &    U R                  S5        g )Nz8def f(unsigned long long long long long int y):
    passr   r   s    r   test_longness_and_signedness+TestCodeWriter.test_longness_and_signedness@   s    JKr   c                 &    U R                  S5        g )Nz#def f(signed short int y):
    passr   r   s    r   test_signed_short TestCodeWriter.test_signed_shortC   s    56r   c                 &    U R                  S5        g )Nz+def f(int x, unsigned long int y):
    passr   r   s    r   test_typed_argsTestCodeWriter.test_typed_argsF   s    =>r   c                 &    U R                  S5        g )Nzh
                    cdef int hello
                    cdef int hello = 4, x = 3, y, z
                r   r   s    r   test_cdef_varTestCodeWriter.test_cdef_varI   s      	r   c                 H    U R                  S5        U R                  S5        g )Nz
                    for x, y, z in f(g(h(34) * 2) + 23):
                        print(x, y, z)
                    else:
                        print(43)
                z
                    for abc in (1, 2, 3):
                        print(x, y, z)
                    else:
                        print(43)
                r   r   s    r   test_for_loopTestCodeWriter.test_for_loopO   s&      	 	  	r   c                 &    U R                  S5        g )Nz
                    while True:
                        while True:
                            while True:
                                continue
                r   r   s    r   test_while_loopTestCodeWriter.test_while_loop]   s      	r   c                 &    U R                  S5        g )Nzx += 43r   r   s    r   test_inplace_assignment&TestCodeWriter.test_inplace_assignmente   s    yr   c                 &    U R                  S5        g )Nzx = y = z = abc = 43r   r   s    r   test_cascaded_assignment'TestCodeWriter.test_cascaded_assignmenth   s    %&r   c                 &    U R                  S5        g )Nza.xr   r   s    r   test_attributeTestCodeWriter.test_attributek   s    ur   c                 &    U R                  S5        g )Na  
                    def f(x, y, z):
                        return
                    cdef f(x, y, z):
                        return
                    def f(x, y, z):
                        return None
                    cdef f(x, y, z):
                        return None
                    def f(x, y, z):
                        return 1234
                    cdef f(x, y, z):
                        return 1234
               r   r   s    r   test_return_noneTestCodeWriter.test_return_nonen   s      	r    N)__name__
__module____qualname____firstlineno__r   r   r   r   r   r    r#   r&   r)   r,   r/   r2   r5   r8   r;   r>   __static_attributes__r@   r   r   r   r      sS    >"
L7?'r   r   __main__N)Cython.TestUtilsr   r   rA   unittestmainr@   r   r   <module>rJ      s2    'yZ yv zMMO r   