o 6a@s6ddlZddlmZddlmZGdddejZdS)N)util) crackfortranc@s2eZdZdZddgZedZddZddZ d S) TestAbstractInterfacez.f90add1add2a 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|jjdddks JdS)N) )module ops_modulefoo)selfrJ/usr/lib/python3/dist-packages/numpy/f2py/tests/test_abstract_interface.pytest_abstract_interface0sz-TestAbstractInterface.test_abstract_interfacecCs|d}|d}|tdWdn1swYtt|g}t|dks1Jt|dddks=J|dddddksKJdS) Nzgh18403_mod.f90wz module test abstract interface subroutine foo() end subroutine end interface end module test rrbodyblockzabstract interface)openwritetextwrapdedentrstrlen)rtmp_pathf_pathffmodrrrtest_parse_abstract_interface3s   z3TestAbstractInterface.test_parse_abstract_interfaceN) __name__ __module__ __qualname__suffixskiprrcoderr rrrrrs  % r)rr numpy.f2pyrF2PyTestrrrrrs