
    J/Ph                         d dl mZmZ d dlmZ d dlmZ  G d de          ZdZ	 G d de          Z
ed	k    r ej                     d
S d
S )    )unittestCUDATestCase)cuda)configc                       e Zd ZdS )MyErrorN)__name__
__module____qualname__     d/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/numba/cuda/tests/cudapy/test_userexc.pyr   r      s        Dr   r   zFIn function [\'"]test_exc[\'"], file [\:\.\/\\\-a-zA-Z_0-9]+, line \d+c                   $     e Zd Z fdZd Z xZS )TestUserExcc                 r    t                                                       |                     d           d S )Nz!Exceptions not supported with LTO)supersetUpskip_if_lto)self	__class__s    r   r   zTestUserExc.setUp   s1     	<=====r   c                 P   t          j        dd          d             } |d         d           |                     t                    5 } |d         d           d d d            n# 1 swxY w Y   t          j        s-|                     t          |j                  t                     | 
                    dt          |j                             |                     t                    5 } |d         d	           d d d            n# 1 swxY w Y   t          j        sZ|                     t          |j                  t                     |                     t          |j                  t                     | 
                    d
t          |j                             d S )Nzvoid(int32)T)debugc                 J    | dk    rt           | dk    rt          d          d S )N      foo)r   )xs    r   test_excz1TestUserExc.test_user_exception.<locals>.test_exc   s,    Avvaenn$ r   )r   r   r   r   ztid=[0, 0, 0] ctaid=[0, 0, 0]r   z"tid=[0, 0, 0] ctaid=[0, 0, 0]: foo)r   jitassertRaisesr   r   ENABLE_CUDASIMassertRegexstr	exceptionregex_patternassertIn)r   r   cms      r   test_user_exceptionzTestUserExc.test_user_exception   s   	-t	,	,	,	% 	% 
-	,	% 	qw'' 	2HTN1	 	 	 	 	 	 	 	 	 	 	 	 	 	 	$ 	?S..>>>5s2<7H7HIIIw'' 	2HTN1	 	 	 	 	 	 	 	 	 	 	 	 	 	 	$ 	?S..>>>S..>>>:C<M<MNNNNNs$   A))A-0A-/DDD)r	   r
   r   r   r(   __classcell__)r   s   @r   r   r      sN        > > > > >O O O O O O Or   r   __main__N)numba.cuda.testingr   r   numbar   
numba.corer   	Exceptionr   r%   r   r	   mainr   r   r   <module>r0      s    5 5 5 5 5 5 5 5            	 	 	 	 	i 	 	 	
 N 
O O O O O, O O O> zHMOOOOO r   