o
    i                     @   sd   d dl mZmZ d dlmZ d dlmZ G dd deZdZ	G dd deZ
ed	kr0e  d
S d
S )    )unittestCUDATestCase)cuda)configc                   @   s   e Zd ZdS )MyErrorN)__name__
__module____qualname__ r
   r
   a/home/ubuntu/veenaModal/venv/lib/python3.10/site-packages/numba/cuda/tests/cudapy/test_userexc.pyr      s    r   zFIn function [\'"]test_exc[\'"], file [\:\.\/\\\-a-zA-Z_0-9]+, line \d+c                       s$   e Zd Z fddZdd Z  ZS )TestUserExcc                    s   t    | d d S )Nz!Exceptions not supported with LTO)supersetUpskip_if_lto)self	__class__r
   r   r      s   
zTestUserExc.setUpc                 C   s   t jddddd }|d d | t}|d d W d    n1 s'w   Y  tjs8| t|jt	 | 
d	t|j | t}|d d
 W d    n1 sWw   Y  tjsq| t|jt	 | t|jt	 | 
dt|j d S )Nzvoid(int32)T)debugc                 S   s    | dkrt | dkrt dd S )N      foo)r   )xr
   r
   r   test_exc   s
   z1TestUserExc.test_user_exception.<locals>.test_exc)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   cmr
   r
   r   test_user_exception   s    
zTestUserExc.test_user_exception)r   r   r	   r   r"   __classcell__r
   r
   r   r   r      s    r   __main__N)numba.cuda.testingr   r   numbar   
numba.corer   	Exceptionr   r   r   r   mainr
   r
   r
   r   <module>   s    