# loki.transformations.extract.tests.test_extract_internal

Functions

`test_extract_internal_procedures_basic_array`(...) | Tests that a global array variable (and a scalar) is correctly added as argument of inner.
`test_extract_internal_procedures_basic_import`(...) | Tests that a global imported binding is correctly introduced to the contained subroutine.
`test_extract_internal_procedures_basic_scalar`(...) | Tests that a global scalar is correctly added as argument of inner.
`test_extract_internal_procedures_basic_scalar_function`(...) | Basic test for scalars highlighting that the inner procedure may also be a function.
`test_extract_internal_procedures_basic_scalar_function_both`(...) | Basic test for scalars highlighting that the outer and inner procedure may be functions.
`test_extract_internal_procedures_contains_emptied`(...) | Tests that the contains section does not contain any functions or subroutines after processing.
`test_extract_internal_procedures_derived_type_field`(...) | Test that when a derived type field, i.e 'a%b' is a global in the scope of the contained subroutine, the derived type itself, that is, 'a', is introduced as an the argument in the transformation.
`test_extract_internal_procedures_derived_type_resolution`(...) | Tests that an unresolved derived type in inner scope is resolved from import in outer scope.
`test_extract_internal_procedures_existing_call_args`(...) | Tests that variable resolution process works correctly when the parent contains a call to the extracted function that already has some calling arguments.
`test_extract_internal_procedures_intent`(frontend) | This test is just to document the current behaviour: when a global is introduced as an argument to the extracted contained procedure, its intent will be 'inout', unless the intent is specified in the parent procedure.
`test_extract_internal_procedures_kind_resolution`(...) | Tests that an unresolved kind parameter in inner scope is resolved from import in outer scope.
`test_extract_internal_procedures_multiple_internal_procedures`(...) | Basic test to check that multiple contained procedures can also be handled.
`test_extract_internal_procedures_recursive_definition`(...) | Tests that whenever a global in the contained subroutine depends on another global variable, both are introduced as arguments, even if there is no explicit reference to the latter.
`test_extract_internal_procedures_recursive_definition_import`(...) | Tests that whenever globals in the contained subroutine depend on imported bindings, the globals are introduced as arguments, and the imports are added to the contained subroutine.
`test_extract_internal_procedures_undefined_in_parent`(...) | This test is just to document current behaviour: an exception is raised if a global inside the contained procedure does not have a definition in the parent scope.

test_extract_internal_procedures_basic_scalar(frontend)

  Tests that a global scalar is correctly added as argument of inner.

test_extract_internal_procedures_contains_emptied(frontend)

  Tests that the contains section does not contain any functions or subroutines after processing.

test_extract_internal_procedures_basic_array(frontend)

  Tests that a global array variable (and a scalar) is correctly added as argument of inner.

test_extract_internal_procedures_existing_call_args(frontend)

  Tests that variable resolution process works correctly when the parent contains a call to the extracted function that already has some calling arguments. Test also that new args are introduced as kw arguments.

test_extract_internal_procedures_basic_import(frontend)

  Tests that a global imported binding is correctly introduced to the contained subroutine.

test_extract_internal_procedures_recursive_definition(frontend)

  Tests that whenever a global in the contained subroutine depends on another global variable, both are introduced as arguments, even if there is no explicit reference to the latter.

test_extract_internal_procedures_recursive_definition_import(frontend)

  Tests that whenever globals in the contained subroutine depend on imported bindings, the globals are introduced as arguments, and the imports are added to the contained subroutine.

test_extract_internal_procedures_kind_resolution(frontend)

  Tests that an unresolved kind parameter in inner scope is resolved from import in outer scope.

test_extract_internal_procedures_derived_type_resolution(frontend)

  Tests that an unresolved derived type in inner scope is resolved from import in outer scope.

test_extract_internal_procedures_derived_type_field(frontend)

  Test that when a derived type field, i.e ‘a%b’ is a global in the scope of the contained subroutine, the derived type itself, that is, ‘a’, is introduced as an the argument in the transformation.

test_extract_internal_procedures_intent(frontend)

  This test is just to document the current behaviour: when a global is introduced as an argument to the extracted contained procedure, its intent will be ‘inout’, unless the intent is specified in the parent procedure.

test_extract_internal_procedures_undefined_in_parent(frontend)

  This test is just to document current behaviour: an exception is raised if a global inside the contained procedure does not have a definition in the parent scope.

test_extract_internal_procedures_multiple_internal_procedures(frontend)

  Basic test to check that multiple contained procedures can also be handled.

test_extract_internal_procedures_basic_scalar_function(frontend)

  Basic test for scalars highlighting that the inner procedure may also be a function.

test_extract_internal_procedures_basic_scalar_function_both(frontend)

  Basic test for scalars highlighting that the outer and inner procedure may be functions.