Skip to content

Commit

Permalink
Fixed wrong test
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfhm committed Oct 16, 2023
1 parent 889626c commit 78464c0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/test_transform_inline.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,12 +473,11 @@ def test_inline_member_routines_variable_shadowing(frontend):
fcode = """
subroutine outer()
real :: x = 3 ! 'x' is real in outer.
real :: tmp = 0
real :: y
y = 1.0
call inner(tmp, y=y)
x = x + tmp
call inner(y)
x = x + y
contains
subroutine inner(y)
Expand Down Expand Up @@ -515,7 +514,7 @@ def test_inline_member_routines_variable_shadowing(frontend):
# Check inner 'y' was substituted, not renamed!
assign = FindNodes(Assignment).visit(routine.body)
assert routine.variable_map['y'] == 'y'
assert assign[2].lhs == 'y' and assign[2].rhs == 'y + sum(x)'
assert assign[2].lhs == 'y' and assign[2].rhs == 'y + sum(inner_x)'


@pytest.mark.parametrize('frontend', available_frontends())
Expand Down

0 comments on commit 78464c0

Please sign in to comment.