Skip to content

Commit

Permalink
add builtin tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed Aug 5, 2023
1 parent e28a9e9 commit 5f2050d
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions tests/parser/syntax/test_for_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,42 @@ def test()-> (DynArray[uint256, 6], DynArray[uint256, 10]):
return b, self.arr
""",
ImmutableViolation,
),
(
"""
@external
def bar(x:address):
for i in range(1 if raw_call(x, b'', revert_on_failure=False) else 2 , bound = 12):
pass
""",
ImmutableViolation,
),
(
"""
@external
def foo(a: address):
for i in range(1 if convert(create_minimal_proxy_to(a), uint256) > 2 else 2, bound=12):
pass
""",
ImmutableViolation,
),
(
"""
@external
def foo(a: address):
for i in range(1 if convert(create_copy_of(a), uint256) > 2 else 2, bound=12):
pass
""",
ImmutableViolation,
),
(
"""
@external
def foo(a: address):
for i in range(1 if convert(create_from_blueprint(a), uint256) > 2 else 2, bound=12):
pass
""",
ImmutableViolation,
)
]

Expand Down

0 comments on commit 5f2050d

Please sign in to comment.