-
-
Notifications
You must be signed in to change notification settings - Fork 836
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #452 from daejunpark/master
fix issue #448: buggy translation of LLL operator `sha3_32`
- Loading branch information
Showing
2 changed files
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import pytest | ||
from viper.parser.parser_utils import LLLnode | ||
from viper import compile_lll, optimizer | ||
|
||
def test_sha3_32(): | ||
lll = ['sha3_32', 0] | ||
evm = ['PUSH1', 0, 'PUSH1', 192, 'MSTORE', 'PUSH1', 32, 'PUSH1', 192, 'SHA3'] | ||
assert compile_lll.compile_to_assembly(LLLnode.from_list(lll)) == evm | ||
assert compile_lll.compile_to_assembly(optimizer.optimize(LLLnode.from_list(lll))) == evm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters