loki.ir.tests.test_visitor

Functions

test_attach_scopes_associates(frontend, tmp_path)

test_expression_callback_mapper(frontend)

Test the ExpressionFinder together with ExpressionCallbackMapper.

test_expression_finder(frontend)

Test the expression finder's ability to yield only all variables.

test_expression_finder_unique(frontend)

Test the expression finder's ability to yield unique variables.

test_expression_finder_unique_with_ir_node(...)

Test the expression finder's ability to yield the ir node combined with only unique variables.

test_expression_finder_with_ir_node(frontend)

Test the expression finder's ability to yield the root node.

test_expression_retriever_recurse_query(frontend)

Test the ExpressionRetriever with a custom recurse query that allows to terminate recursion early.

test_find_nodes_greedy(frontend)

Test the FindNodes visitor's greedy property.

test_find_scopes(frontend)

Test the FindScopes visitor.

test_find_variables_associates(frontend)

Test correct discovery of variables in associates.

test_is_child_of(frontend)

Test the is_child_of utility.

test_is_parent_of(frontend)

Test the is_parent_of utility.

test_find_nodes_greedy(frontend)

Test the FindNodes visitor’s greedy property.

test_find_scopes(frontend)

Test the FindScopes visitor.

test_expression_finder(frontend)

Test the expression finder’s ability to yield only all variables.

test_expression_finder_unique(frontend)

Test the expression finder’s ability to yield unique variables.

test_expression_finder_with_ir_node(frontend)

Test the expression finder’s ability to yield the root node.

test_expression_finder_unique_with_ir_node(frontend)

Test the expression finder’s ability to yield the ir node combined with only unique variables.

test_expression_callback_mapper(frontend)

Test the ExpressionFinder together with ExpressionCallbackMapper. This is just a very basic sanity check and does not cover all angles.

test_expression_retriever_recurse_query(frontend)

Test the ExpressionRetriever with a custom recurse query that allows to terminate recursion early.

test_find_variables_associates(frontend)

Test correct discovery of variables in associates.

test_is_parent_of(frontend)

Test the is_parent_of utility.

test_is_child_of(frontend)

Test the is_child_of utility.

test_attach_scopes_associates(frontend, tmp_path)