ó
¦V]c           @   sO   d  d l  m Z d e f d „  ƒ  YZ e d k rK d  d l Z e j ƒ  n  d S(   iÿÿÿÿ(   t
   CythonTestt   TestCodeWriterc           B   st   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d	 „  Z d
 „  Z d „  Z RS(   c         C   s    |  j  | |  j | ƒ j ƒ d  S(   N(   t
   assertCodet   fragmentt   root(   t   selft   codestr(    (    s:   lib/python2.7/site-packages/Cython/Tests/TestCodeWriter.pyt   t   s    c         C   s   |  j  d ƒ d  S(   Nuw   
                    print x, y
                    print x + y ** 2
                    print x, y, z,
               (   R   (   R   (    (    s:   lib/python2.7/site-packages/Cython/Tests/TestCodeWriter.pyt
   test_print   s    c         C   s   |  j  d ƒ d  S(   Nu   if x:
    pass(   R   (   R   (    (    s:   lib/python2.7/site-packages/Cython/Tests/TestCodeWriter.pyt   test_if   s    c         C   s   |  j  d ƒ d  S(   Nu   
                    if x:
                        pass
                    elif y:
                        pass
                    elif z + 34 ** 34 - 2:
                        pass
                    else:
                        pass
                (   R   (   R   (    (    s:   lib/python2.7/site-packages/Cython/Tests/TestCodeWriter.pyt   test_ifelifelse   s    	c         C   s   |  j  d ƒ d  S(   Nuœ   
                    def f(x, y, z):
                        pass
                    def f(x = 34, y = 54, z):
                        pass
               (   R   (   R   (    (    s:   lib/python2.7/site-packages/Cython/Tests/TestCodeWriter.pyt   test_def*   s    c         C   s   |  j  d ƒ d  S(   Nu8   def f(unsigned long long long long long int y):
    pass(   R   (   R   (    (    s:   lib/python2.7/site-packages/Cython/Tests/TestCodeWriter.pyt   test_longness_and_signedness2   s    c         C   s   |  j  d ƒ d  S(   Nu#   def f(signed short int y):
    pass(   R   (   R   (    (    s:   lib/python2.7/site-packages/Cython/Tests/TestCodeWriter.pyt   test_signed_short5   s    c         C   s   |  j  d ƒ d  S(   Nu+   def f(int x, unsigned long int y):
    pass(   R   (   R   (    (    s:   lib/python2.7/site-packages/Cython/Tests/TestCodeWriter.pyt   test_typed_args8   s    c         C   s   |  j  d ƒ d  S(   Nuh   
                    cdef int hello
                    cdef int hello = 4, x = 3, y, z
                (   R   (   R   (    (    s:   lib/python2.7/site-packages/Cython/Tests/TestCodeWriter.pyt   test_cdef_var;   s    c         C   s   |  j  d ƒ d  S(   Nu«   
                    for x, y, z in f(g(h(34) * 2) + 23):
                        print x, y, z
                    else:
                        print 43
                (   R   (   R   (    (    s:   lib/python2.7/site-packages/Cython/Tests/TestCodeWriter.pyt   test_for_loopA   s    c         C   s   |  j  d ƒ d  S(   Nu   x += 43(   R   (   R   (    (    s:   lib/python2.7/site-packages/Cython/Tests/TestCodeWriter.pyt   test_inplace_assignmentI   s    c         C   s   |  j  d ƒ d  S(   Nu   a.x(   R   (   R   (    (    s:   lib/python2.7/site-packages/Cython/Tests/TestCodeWriter.pyt   test_attributeL   s    (   t   __name__t
   __module__R   R   R	   R
   R   R   R   R   R   R   R   R   (    (    (    s:   lib/python2.7/site-packages/Cython/Tests/TestCodeWriter.pyR      s   											t   __main__N(   t   Cython.TestUtilsR    R   R   t   unittestt   main(    (    (    s:   lib/python2.7/site-packages/Cython/Tests/TestCodeWriter.pyt   <module>   s   L