loki.tests.test_modules

Functions

test_dimension_pragmas(frontend, tmp_path)

Test that loki-specific dimension annotations are detected and used to set shapes.

test_external_function_call(frontend, tmp_path)

Test the use of InlineCall symbols linked to an external function definition.

test_internal_function_call(frontend, tmp_path)

Test the use of InlineCall symbols linked to an module function.

test_module_access_attr(frontend, tmp_path)

Test correct parsing of access-spec attributes

test_module_access_spec_none(frontend, tmp_path)

Test correct parsing without access-spec statements

test_module_access_spec_private(frontend, ...)

Test correct parsing of access-spec statements with default private

test_module_access_spec_public(frontend, ...)

Test correct parsing of access-spec statements with default public

test_module_all_imports(frontend, tmp_path)

test_module_comparison(frontend, tmp_path)

Test that string-equivalence works on relevant components.

test_module_comparison_case_sensitive(...)

Test that semantic, but no string-equivalence evaluates as not eqal

test_module_contains_auto_insert(frontend, ...)

Test that CONTAINS keyword is automatically inserted into the contains section of a ProgramUnit object.

test_module_deep_clone(frontend, tmp_path)

Test the rescoping of variables in clone with nested scopes.

test_module_enrichment_typedefs(frontend, ...)

Test that module-level enrichment is propagated correctly

test_module_enrichment_within_file(frontend, ...)

test_module_external_typedefs_subroutine(...)

Test that externally provided type information is correctly attached to a Module subroutine when supplied via the typedefs parameter in the constructor.

test_module_external_typedefs_type(frontend, ...)

Test that externally provided type information is correctly attached to a Module type and used in a contained subroutine when supplied via the typedefs parameter in the constructor.

test_module_from_source(frontend, tmp_path)

Test the creation of Module objects from raw source strings.

test_module_missing_imported_symbol(...)

test_module_nested_types(frontend, tmp_path)

Test that ensure that nested internal derived type definitions are detected and connected correctly.

test_module_rename_imports_no_definitions(...)

Test use statement with rename lists when definitions are not available

test_module_rename_imports_with_definitions(...)

Test use statement with rename lists

test_module_rescope_clone(frontend, tmp_path)

Test the rescoping of variables in clone.

test_module_rescope_symbols(frontend, tmp_path)

Test the rescoping of variables.

test_module_spec_parts(frontend, spec, ...)

Test the spec_parts property of Module

test_module_use_module_nature(frontend, tmp_path)

Test module natures attributes in USE statements

test_module_variables_add_remove(frontend, ...)

Test local variable addition and removal.

test_nested_types_dimension_pragmas(...)

Test that loki-specific dimension annotations are detected and propagated in nested type definitions.

test_module_from_source(frontend, tmp_path)

Test the creation of Module objects from raw source strings.

test_module_external_typedefs_subroutine(frontend, tmp_path)

Test that externally provided type information is correctly attached to a Module subroutine when supplied via the typedefs parameter in the constructor.

test_module_external_typedefs_type(frontend, tmp_path)

Test that externally provided type information is correctly attached to a Module type and used in a contained subroutine when supplied via the typedefs parameter in the constructor.

test_module_nested_types(frontend, tmp_path)

Test that ensure that nested internal derived type definitions are detected and connected correctly.

test_dimension_pragmas(frontend, tmp_path)

Test that loki-specific dimension annotations are detected and used to set shapes.

test_nested_types_dimension_pragmas(frontend, tmp_path)

Test that loki-specific dimension annotations are detected and propagated in nested type definitions.

test_internal_function_call(frontend, tmp_path)

Test the use of InlineCall symbols linked to an module function.

test_external_function_call(frontend, tmp_path)

Test the use of InlineCall symbols linked to an external function definition.

test_module_variables_add_remove(frontend, tmp_path)

Test local variable addition and removal.

test_module_rescope_symbols(frontend, tmp_path)

Test the rescoping of variables.

test_module_rescope_clone(frontend, tmp_path)

Test the rescoping of variables in clone.

test_module_deep_clone(frontend, tmp_path)

Test the rescoping of variables in clone with nested scopes.

test_module_access_spec_none(frontend, tmp_path)

Test correct parsing without access-spec statements

test_module_access_spec_private(frontend, tmp_path)

Test correct parsing of access-spec statements with default private

test_module_access_spec_public(frontend, tmp_path)

Test correct parsing of access-spec statements with default public

test_module_access_attr(frontend, tmp_path)

Test correct parsing of access-spec attributes

test_module_rename_imports_with_definitions(frontend, tmp_path)

Test use statement with rename lists

test_module_rename_imports_no_definitions(frontend, tmp_path)

Test use statement with rename lists when definitions are not available

test_module_use_module_nature(frontend, tmp_path)

Test module natures attributes in USE statements

test_module_spec_parts(frontend, spec, part_lengths, tmp_path)

Test the spec_parts property of Module

test_module_comparison(frontend, tmp_path)

Test that string-equivalence works on relevant components.

test_module_comparison_case_sensitive(frontend, tmp_path)

Test that semantic, but no string-equivalence evaluates as not eqal

test_module_contains_auto_insert(frontend, tmp_path)

Test that CONTAINS keyword is automatically inserted into the contains section of a ProgramUnit object.

test_module_missing_imported_symbol(frontend, only_list, complete_tree, tmp_path)
test_module_all_imports(frontend, tmp_path)
test_module_enrichment_within_file(frontend, tmp_path)
test_module_enrichment_typedefs(frontend, tmp_path)

Test that module-level enrichment is propagated correctly