
    xKg                     t    d Z ddlmZ ddlmZ ddlmZmZ  G d de      Ze	dk(  r ej                          yy)	zW
Test function name mangling.
The mangling affects the ABI of numba compiled binaries.
    )types)default_mangler)unittestTestCasec                       e Zd Zd Zd Zd Zy)TestManglingc                 f    d}t         j                  f}t        ||      }| j                  |d       y )Nfoo_Z3fooi)r   int32r   assertEqualselffnameargtypesnames       ]/home/alanp/www/video.onchill/myenv/lib/python3.12/site-packages/numba/tests/test_mangling.pytest_one_argszTestMangling.test_one_args   s.    ;;<uh/y)    c                     d}t         j                  t         j                  f}t        ||      }| j	                  |d       y )Nr
   _Z3fooif)r   r   float32r   r   r   s       r   test_two_argszTestMangling.test_two_args   s5    ;;-uh/z*r   c                 l   d}t         j                  t         j                  f}t        ||      }| j	                  |t
               |d   }dj                  d |j                  d      D              }d|z   }dj                  t        |      |      }| j                  ||       | j                  |d       y )	Nu   foಠ    c              3   >   K   | ]  }d j                  |        yw)z_{:02x}N)format).0cs     r   	<genexpr>z2TestMangling.test_unicode_fname.<locals>.<genexpr>   s#      75!  &&q)5s   utf8foz_Z{}{}ifz^_Z[a-zA-Z0-9_\$]+$)r   r   r   r   assertIsInstancestrjoinencoder   lenr   assertRegex)r   r   r   r   unicharenctextexpects           r   test_unicode_fnamezTestMangling.test_unicode_fname   s    ;;-uh/dC((gg 7&~~f57 7cz""3t9d3v&56r   N)__name__
__module____qualname__r   r   r.    r   r   r   r      s    *+7r   r   __main__N)__doc__
numba.corer   numba.core.funcdescr   numba.tests.supportr   r   r   r/   mainr2   r   r   <module>r9      s;     / 278 7: zHMMO r   