o
    ðT·j  ã                   @   s2   d dl Z d dlZddlmZ G dd„ dejƒZdS )é    Né   )Úutilc                   @   s  e Zd Ze dddd¡e dddd¡e dddd¡e dddd¡e dddd¡e dddd	¡gZejjd
d„ ƒZ	ejjdd„ ƒZ
ejjdd„ ƒZejjdd„ ƒZejjdd„ ƒZejjdd„ ƒZejjdd„ ƒZejjdd„ ƒZejjdd„ ƒZdd„ Zdd„ Zd d!„ Zd"S )#ÚTestParametersÚtestsÚsrcÚ	parameterzconstant_real.f90zconstant_integer.f90zconstant_both.f90zconstant_compound.f90zconstant_non_compound.f90zconstant_array.f90c                 C   ó`   t jdt jd�d d d… }t t| jj|¡ t jdt jd�}| j |¡ t  |g d¢¡s.J ‚d S ©Né   ©Údtypeé   é   )é   r   r   )	ÚnpÚarangeÚfloat32ÚpytestÚraisesÚ
ValueErrorÚmoduleÚ
foo_singleÚallclose©ÚselfÚx© r   úb/home/dinkstrade/pdmp-scanner/venv/lib/python3.10/site-packages/numpy/f2py/tests/test_parameter.pyÚtest_constant_real_single   ó
   z(TestParameters.test_constant_real_singlec                 C   r   r	   )	r   r   Úfloat64r   r   r   r   Ú
foo_doubler   r   r   r   r   Útest_constant_real_double   r   z(TestParameters.test_constant_real_doublec                 C   r   )Nr
   r   r   r   )é   r   r   )	r   r   Úint32r   r   r   r   Úfoo_compound_intr   r   r   r   r   Útest_constant_compound_int)   r   z)TestParameters.test_constant_compound_intc                 C   s4   t jdt jd�}| j |¡ t  |g d¢¡sJ ‚d S )Né   r   )é   r   r   r   )r   r   r$   r   Úfoo_non_compound_intr   r   r   r   r   Útest_constant_non_compound_int4   s   z-TestParameters.test_constant_non_compound_intc                 C   r   r	   )	r   r   r$   r   r   r   r   Úfoo_intr   r   r   r   r   Útest_constant_integer_int;   r   z(TestParameters.test_constant_integer_intc                 C   r   r	   )	r   r   Úint64r   r   r   r   Úfoo_longr   r   r   r   r   Útest_constant_integer_longF   r   z)TestParameters.test_constant_integer_longc                 C   r   ©Nr
   r   r   r   )é   r   r
   )	r   r   r    r   r   r   r   Úfoor   r   r   r   r   Útest_constant_bothQ   r   z!TestParameters.test_constant_bothc                 C   r   r0   )	r   r   r    r   r   r   r   Úfoo_nor   r   r   r   r   Útest_constant_no\   r   zTestParameters.test_constant_noc                 C   r   r0   )	r   r   r    r   r   r   r   Úfoo_sumr   r   r   r   r   Útest_constant_sumg   r   z TestParameters.test_constant_sumc                 C   sj   t jdt jd�}t jdt jd�}| j ||¡}t  |g d¢¡s!J ‚t  |g d¢¡s+J ‚t  |d¡s3J ‚d S )Nr   r   é   )ç        gš™™™™™¹?gš™™™™™É?)r9   g      $@g      4@g      >@g      D@g      3@)r   r   r    r   Ú	foo_arrayr   )r   r   ÚyÚzr   r   r   Útest_constant_arrayr   s   z"TestParameters.test_constant_arrayc                 C   s:   t jdt jd�}| j |¡}t  ||jddd�¡sJ ‚d S )Nr
   r   )r   r   ÚF)Úorder)r   r   r    r   Úfoo_array_any_indexr   Úreshape)r   r   r;   r   r   r   Útest_constant_array_any_indexz   s   z,TestParameters.test_constant_array_any_indexc                 C   s   | j  ¡ }|dksJ ‚d S )Né	   )r   Úfoo_array_delimsr   r   r   r   Útest_constant_array_delims   s   
z)TestParameters.test_constant_array_delimsN)Ú__name__Ú
__module__Ú__qualname__r   ÚgetpathÚsourcesr   ÚmarkÚslowr   r"   r&   r*   r,   r/   r3   r5   r7   r=   rB   rE   r   r   r   r   r      s:    ú	
















r   )r   Únumpyr   Ú r   ÚF2PyTestr   r   r   r   r   Ú<module>   s    