|
|
@ -44,6 +44,7 @@ def test_constant_folding_rational(): |
|
|
|
assert str(variable_g.type) == "int64" |
|
|
|
assert str(variable_g.type) == "int64" |
|
|
|
assert str(ConstantFolding(variable_g.expression, "int64").result()) == "-7" |
|
|
|
assert str(ConstantFolding(variable_g.expression, "int64").result()) == "-7" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_constant_folding_binary_expressions(): |
|
|
|
def test_constant_folding_binary_expressions(): |
|
|
|
sl = Slither("./tests/constant_folding_binop.sol") |
|
|
|
sl = Slither("./tests/constant_folding_binop.sol") |
|
|
|
contract = sl.get_contract_from_name("BinOp")[0] |
|
|
|
contract = sl.get_contract_from_name("BinOp")[0] |
|
|
|