Skip to content

Commit

Permalink
fix more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed Nov 2, 2023
1 parent a8dd405 commit 9c417c5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
5 changes: 5 additions & 0 deletions tests/parser/exceptions/test_argument_exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ def foo():
for i in range(1, 2, 3, 4):
pass
""",
"""
@external
def foo():
x = as_wei_value(5, "vader")
""",
]


Expand Down
5 changes: 0 additions & 5 deletions tests/parser/exceptions/test_undeclared_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ def foo():
def foo():
bork = zork
""",
"""
@external
def foo():
x = as_wei_value(5, "vader")
""",
]


Expand Down
7 changes: 1 addition & 6 deletions tests/parser/functions/test_unary.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,11 @@ def bar() -> decimal:

def test_negation_int128(get_contract):
code = """
a: constant(int128) = -2**127
@external
def foo() -> int128:
return -2**127
a: constant(int128) = min_value(int128)
@external
def bar() -> int128:
return -(a+1)
"""
c = get_contract(code)
assert c.foo() == -(2**127)
assert c.bar() == 2**127 - 1

0 comments on commit 9c417c5

Please sign in to comment.