HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/numpy/f2py/tests/__pycache__/test_abstract_interface.cpython-310.pyc
o

6��a�@s6ddlZddlmZddlmZGdd�dej�ZdS)�N�)�util)�crackfortranc@s2eZdZdZddgZe�d�Zdd�Zdd�Z	d	S)
�TestAbstractInterfacez.f90�add1�add2a�
        module ops_module

          abstract interface
            subroutine op(x, y, z)
              integer, intent(in) :: x, y
              integer, intent(out) :: z
            end subroutine
          end interface

        contains

          subroutine foo(x, y, r1, r2)
            integer, intent(in) :: x, y
            integer, intent(out) :: r1, r2
            procedure (op) add1, add2
            procedure (op), pointer::p
            p=>add1
            call p(x, y, r1)
            p=>add2
            call p(x, y, r2)
          end subroutine
        end module

        subroutine add1(x, y, z)
          integer, intent(in) :: x, y
          integer, intent(out) :: z
          z = x + y
        end subroutine

        subroutine add2(x, y, z)
          integer, intent(in) :: x, y
          integer, intent(out) :: z
          z = x + 2 * y
        end subroutine
        cCs|jj�dd�dksJ�dS)N��)��
)�module�
ops_module�foo)�self�r�J/usr/lib/python3/dist-packages/numpy/f2py/tests/test_abstract_interface.py�test_abstract_interface0sz-TestAbstractInterface.test_abstract_interfacecCs�|d}|�d��}|�t�d��Wd�n1swYt�t|�g�}t|�dks1J�t|dd�dks=J�|dddddksKJ�dS)	Nzgh18403_mod.f90�wz�                module test
                  abstract interface
                    subroutine foo()
                    end subroutine
                  end interface
                end module test
                rr�body�blockzabstract interface)�open�write�textwrap�dedentr�str�len)r�tmp_path�f_path�ff�modrrr�test_parse_abstract_interface3s�	 z3TestAbstractInterface.test_parse_abstract_interfaceN)
�__name__�
__module__�__qualname__�suffix�skiprr�coderr rrrrrs
%r)r�r�
numpy.f2pyr�F2PyTestrrrrr�<module>s