Skip to content

Commit

Permalink
#1799 update failing test that had TODO for 1799
Browse files Browse the repository at this point in the history
  • Loading branch information
arporter committed Nov 10, 2023
1 parent 45c1da1 commit a9a75b6
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/psyclone/tests/psyir/frontend/fparser2_select_case_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,10 +559,8 @@ def test_find_or_create_psyclone_internal_cmp(fortran_writer):

def test_expression_case(fortran_reader, fortran_writer):
'''Test that a select case statement comparing two expressions
is using the generic comparison interface.
# TODO #1799: The interface may not be needed for this case if
# we can successuly obtain the expression.datatype
does not use the generic comparison interface if the types can be
determined.
'''
code = '''
Expand All @@ -584,12 +582,10 @@ def test_expression_case(fortran_reader, fortran_writer):
psyir = fortran_reader.psyir_from_source(code)
output = fortran_writer(psyir)

# Check that the interface implementation has been inserted
has_cmp_interface(output)

# Check that the cannonicalised comparisons use the interface method
assert "if (psyclone_internal_cmp(a * a, b - c)) then" in output
assert "if (psyclone_internal_cmp(a * a, c - b)) then" in output
# Check that the cannonicalised comparisons do not use the interface method
assert "if (a * a == b - c) then" in output
assert "if (a * a == c - b) then" in output
assert "interface psyclone_internal_cmp" not in output


def test_unknown_types_case(fortran_reader, fortran_writer):
Expand Down

0 comments on commit a9a75b6

Please sign in to comment.