!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/camera_detection/env/lib/python3.8/site-packages/numpy/f2py/tests/   drwxr-xr-x
Free 13.11 GB of 57.97 GB (22.62%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     test_abstract_interface.py (1.77 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import textwrap
from . import util
from numpy.f2py import crackfortran


class TestAbstractInterface(util.F2PyTest):
    suffix = '.f90'

    skip = ['add1', 'add2']

    code = textwrap.dedent("""
        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
        """)

    def test_abstract_interface(self):
        assert self.module.ops_module.foo(3, 5) == (8, 13)

    def test_parse_abstract_interface(self, tmp_path):
        # Test gh18403
        f_path = tmp_path / "gh18403_mod.f90"
        with f_path.open('w') as ff:
            ff.write(textwrap.dedent("""\
                module test
                  abstract interface
                    subroutine foo()
                    end subroutine
                  end interface
                end module test
                """))
        mod = crackfortran.crackfortran([str(f_path)])
        assert len(mod) == 1
        assert len(mod[0]['body']) == 1
        assert mod[0]['body'][0]['block'] == 'abstract interface'

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0049 ]--