diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-09-19 20:37:59 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-11-13 20:47:29 +0800 |
commit | 280255e64dd918e644d976a7758ef110d2ab76c8 (patch) | |
tree | f2a3dc34a243a822d156f878982f21204238e2a4 /test | |
parent | c320a650f940fe96108c4c4687313ef26a33e248 (diff) | |
download | dexon-solidity-280255e64dd918e644d976a7758ef110d2ab76c8.tar dexon-solidity-280255e64dd918e644d976a7758ef110d2ab76c8.tar.gz dexon-solidity-280255e64dd918e644d976a7758ef110d2ab76c8.tar.bz2 dexon-solidity-280255e64dd918e644d976a7758ef110d2ab76c8.tar.lz dexon-solidity-280255e64dd918e644d976a7758ef110d2ab76c8.tar.xz dexon-solidity-280255e64dd918e644d976a7758ef110d2ab76c8.tar.zst dexon-solidity-280255e64dd918e644d976a7758ef110d2ab76c8.zip |
LLL: do not wrap opcode tests into sequence
Diffstat (limited to 'test')
-rw-r--r-- | test/liblll/Compiler.cpp | 478 |
1 files changed, 239 insertions, 239 deletions
diff --git a/test/liblll/Compiler.cpp b/test/liblll/Compiler.cpp index a4394f54..5487ccf3 100644 --- a/test/liblll/Compiler.cpp +++ b/test/liblll/Compiler.cpp @@ -253,109 +253,109 @@ BOOST_AUTO_TEST_CASE(valid_opcodes_functional) }; vector<string> opcodes_lll { - "{ (STOP) }", - "{ (ADD 0 0) }", - "{ (MUL 0 0) }", - "{ (SUB 0 0) }", - "{ (DIV 0 0) }", - "{ (SDIV 0 0) }", - "{ (MOD 0 0) }", - "{ (SMOD 0 0) }", - "{ (ADDMOD 0 0 0) }", - "{ (MULMOD 0 0 0) }", - "{ (EXP 0 0) }", - "{ (SIGNEXTEND 0 0) }", - "{ (LT 0 0) }", - "{ (GT 0 0) }", - "{ (SLT 0 0) }", - "{ (SGT 0 0) }", - "{ (EQ 0 0) }", - "{ (ISZERO 0) }", - "{ (AND 0 0) }", - "{ (OR 0 0) }", - "{ (XOR 0 0) }", - "{ (NOT 0) }", - "{ (BYTE 0 0) }", - "{ (KECCAK256 0 0) }", - "{ (ADDRESS) }", - "{ (BALANCE 0) }", - "{ (ORIGIN) }", - "{ (CALLER) }", - "{ (CALLVALUE) }", - "{ (CALLDATALOAD 0) }", - "{ (CALLDATASIZE) }", - "{ (CALLDATACOPY 0 0 0) }", - "{ (CODESIZE) }", - "{ (CODECOPY 0 0 0) }", - "{ (GASPRICE) }", - "{ (EXTCODESIZE 0) }", - "{ (EXTCODECOPY 0 0 0 0) }", - "{ (RETURNDATASIZE) }", - "{ (RETURNDATACOPY 0 0 0) }", - "{ (EXTCODEHASH 0) }", - "{ (BLOCKHASH 0) }", - "{ (COINBASE) }", - "{ (TIMESTAMP) }", - "{ (NUMBER) }", - "{ (DIFFICULTY) }", - "{ (GASLIMIT) }", - "{ (POP 0) }", - "{ (MLOAD 0) }", - "{ (MSTORE 0 0) }", - "{ (MSTORE8 0 0) }", - "{ (SLOAD 0) }", - "{ (SSTORE 0 0) }", - "{ (JUMP 0) }", - "{ (JUMPI 0 0) }", - "{ (PC) }", - "{ (MSIZE) }", - "{ (GAS) }", - "{ 0xff }", - "{ 0xffff }", - "{ 0xffffff }", - "{ 0xffffffff }", - "{ 0xffffffffff }", - "{ 0xffffffffffff }", - "{ 0xffffffffffffff }", - "{ 0xffffffffffffffff }", - "{ 0xffffffffffffffffff }", - "{ 0xffffffffffffffffffff }", - "{ 0xffffffffffffffffffffff }", - "{ 0xffffffffffffffffffffffff }", - "{ 0xffffffffffffffffffffffffff }", - "{ 0xffffffffffffffffffffffffffff }", - "{ 0xffffffffffffffffffffffffffffff }", - "{ 0xffffffffffffffffffffffffffffffff }", - "{ 0xffffffffffffffffffffffffffffffffff }", - "{ 0xffffffffffffffffffffffffffffffffffff }", - "{ 0xffffffffffffffffffffffffffffffffffffff }", - "{ 0xffffffffffffffffffffffffffffffffffffffff }", - "{ 0xffffffffffffffffffffffffffffffffffffffffff }", - "{ 0xffffffffffffffffffffffffffffffffffffffffffff }", - "{ 0xffffffffffffffffffffffffffffffffffffffffffffff }", - "{ 0xffffffffffffffffffffffffffffffffffffffffffffffff }", - "{ 0xffffffffffffffffffffffffffffffffffffffffffffffffff }", - "{ 0xffffffffffffffffffffffffffffffffffffffffffffffffffff }", - "{ 0xffffffffffffffffffffffffffffffffffffffffffffffffffffff }", - "{ 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff }", - "{ 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffff }", - "{ 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff }", - "{ 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff }", - "{ 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff }", - "{ (LOG0 0 0) }", - "{ (LOG1 0 0 0) }", - "{ (LOG2 0 0 0 0) }", - "{ (LOG3 0 0 0 0 0) }", - "{ (LOG4 0 0 0 0 0 0) }", - "{ (CREATE 0 0 0) }", - "{ (CALL 0 0 0 0 0 0 0) }", - "{ (CALLCODE 0 0 0 0 0 0 0) }", - "{ (RETURN 0 0) }", - "{ (DELEGATECALL 0 0 0 0 0 0) }", - "{ (STATICCALL 0 0 0 0 0 0) }", - "{ (REVERT 0 0) }", - "{ (INVALID) }", - "{ (SELFDESTRUCT 0) }" + "(STOP)", + "(ADD 0 0)", + "(MUL 0 0)", + "(SUB 0 0)", + "(DIV 0 0)", + "(SDIV 0 0)", + "(MOD 0 0)", + "(SMOD 0 0)", + "(ADDMOD 0 0 0)", + "(MULMOD 0 0 0)", + "(EXP 0 0)", + "(SIGNEXTEND 0 0)", + "(LT 0 0)", + "(GT 0 0)", + "(SLT 0 0)", + "(SGT 0 0)", + "(EQ 0 0)", + "(ISZERO 0)", + "(AND 0 0)", + "(OR 0 0)", + "(XOR 0 0)", + "(NOT 0)", + "(BYTE 0 0)", + "(KECCAK256 0 0)", + "(ADDRESS)", + "(BALANCE 0)", + "(ORIGIN)", + "(CALLER)", + "(CALLVALUE)", + "(CALLDATALOAD 0)", + "(CALLDATASIZE)", + "(CALLDATACOPY 0 0 0)", + "(CODESIZE)", + "(CODECOPY 0 0 0)", + "(GASPRICE)", + "(EXTCODESIZE 0)", + "(EXTCODECOPY 0 0 0 0)", + "(RETURNDATASIZE)", + "(RETURNDATACOPY 0 0 0)", + "(EXTCODEHASH 0)", + "(BLOCKHASH 0)", + "(COINBASE)", + "(TIMESTAMP)", + "(NUMBER)", + "(DIFFICULTY)", + "(GASLIMIT)", + "(POP 0)", + "(MLOAD 0)", + "(MSTORE 0 0)", + "(MSTORE8 0 0)", + "(SLOAD 0)", + "(SSTORE 0 0)", + "(JUMP 0)", + "(JUMPI 0 0)", + "(PC)", + "(MSIZE)", + "(GAS)", + "0xff", + "0xffff", + "0xffffff", + "0xffffffff", + "0xffffffffff", + "0xffffffffffff", + "0xffffffffffffff", + "0xffffffffffffffff", + "0xffffffffffffffffff", + "0xffffffffffffffffffff", + "0xffffffffffffffffffffff", + "0xffffffffffffffffffffffff", + "0xffffffffffffffffffffffffff", + "0xffffffffffffffffffffffffffff", + "0xffffffffffffffffffffffffffffff", + "0xffffffffffffffffffffffffffffffff", + "0xffffffffffffffffffffffffffffffffff", + "0xffffffffffffffffffffffffffffffffffff", + "0xffffffffffffffffffffffffffffffffffffff", + "0xffffffffffffffffffffffffffffffffffffffff", + "0xffffffffffffffffffffffffffffffffffffffffff", + "0xffffffffffffffffffffffffffffffffffffffffffff", + "0xffffffffffffffffffffffffffffffffffffffffffffff", + "0xffffffffffffffffffffffffffffffffffffffffffffffff", + "0xffffffffffffffffffffffffffffffffffffffffffffffffff", + "0xffffffffffffffffffffffffffffffffffffffffffffffffffff", + "0xffffffffffffffffffffffffffffffffffffffffffffffffffffff", + "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + "(LOG0 0 0)", + "(LOG1 0 0 0)", + "(LOG2 0 0 0 0)", + "(LOG3 0 0 0 0 0)", + "(LOG4 0 0 0 0 0 0)", + "(CREATE 0 0 0)", + "(CALL 0 0 0 0 0 0 0)", + "(CALLCODE 0 0 0 0 0 0 0)", + "(RETURN 0 0)", + "(DELEGATECALL 0 0 0 0 0 0)", + "(STATICCALL 0 0 0 0 0 0)", + "(REVERT 0 0)", + "(INVALID)", + "(SELFDESTRUCT 0)" }; for (size_t i = 0; i < opcodes_bytecode.size(); i++) @@ -511,142 +511,142 @@ BOOST_AUTO_TEST_CASE(valid_opcodes_asm) }; vector<string> opcodes_lll { - "{ (asm STOP) }", - "{ (asm ADD) }", - "{ (asm MUL) }", - "{ (asm SUB) }", - "{ (asm DIV) }", - "{ (asm SDIV ) }", - "{ (asm MOD) }", - "{ (asm SMOD) }", - "{ (asm ADDMOD) }", - "{ (asm MULMOD) }", - "{ (asm EXP) }", - "{ (asm SIGNEXTEND) }", - "{ (asm LT) }", - "{ (asm GT) }", - "{ (asm SLT) }", - "{ (asm SGT) }", - "{ (asm EQ) }", - "{ (asm ISZERO) }", - "{ (asm AND) }", - "{ (asm OR) }", - "{ (asm XOR) }", - "{ (asm NOT) }", - "{ (asm BYTE) }", - "{ (asm KECCAK256) }", - "{ (asm ADDRESS) }", - "{ (asm BALANCE) }", - "{ (asm ORIGIN) }", - "{ (asm CALLER) }", - "{ (asm CALLVALUE) }", - "{ (asm CALLDATALOAD) }", - "{ (asm CALLDATASIZE) }", - "{ (asm CALLDATACOPY) }", - "{ (asm CODESIZE) }", - "{ (asm CODECOPY) }", - "{ (asm GASPRICE) }", - "{ (asm EXTCODESIZE)}", - "{ (asm EXTCODECOPY) }", - "{ (asm RETURNDATASIZE) }", - "{ (asm RETURNDATACOPY) }", - "{ (asm EXTCODEHASH) }", - "{ (asm BLOCKHASH) }", - "{ (asm COINBASE) }", - "{ (asm TIMESTAMP) }", - "{ (asm NUMBER) }", - "{ (asm DIFFICULTY) }", - "{ (asm GASLIMIT) }", - "{ (asm POP) }", - "{ (asm MLOAD) }", - "{ (asm MSTORE) }", - "{ (asm MSTORE8) }", - "{ (asm SLOAD) }", - "{ (asm SSTORE) }", - "{ (asm JUMP ) }", - "{ (asm JUMPI ) }", - "{ (asm PC) }", - "{ (asm MSIZE) }", - "{ (asm GAS) }", - "{ (asm JUMPDEST) }", - "{ (asm 0xff) }", - "{ (asm 0xffff) }", - "{ (asm 0xffffff) }", - "{ (asm 0xffffffff) }", - "{ (asm 0xffffffffff) }", - "{ (asm 0xffffffffffff) }", - "{ (asm 0xffffffffffffff) }", - "{ (asm 0xffffffffffffffff) }", - "{ (asm 0xffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffffffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffffffffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffffffffffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffffffffffffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffffffffffffffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffffffffffffffffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffffffffffffffffffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) }", - "{ (asm 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) }", - "{ (asm DUP1) }", - "{ (asm DUP2) }", - "{ (asm DUP3) }", - "{ (asm DUP4) }", - "{ (asm DUP5) }", - "{ (asm DUP6) }", - "{ (asm DUP7) }", - "{ (asm DUP8) }", - "{ (asm DUP9) }", - "{ (asm DUP10) }", - "{ (asm DUP11) }", - "{ (asm DUP12) }", - "{ (asm DUP13) }", - "{ (asm DUP14) }", - "{ (asm DUP15) }", - "{ (asm DUP16) }", - "{ (asm SWAP1) }", - "{ (asm SWAP2) }", - "{ (asm SWAP3) }", - "{ (asm SWAP4) }", - "{ (asm SWAP5) }", - "{ (asm SWAP6) }", - "{ (asm SWAP7) }", - "{ (asm SWAP8) }", - "{ (asm SWAP9) }", - "{ (asm SWAP10) }", - "{ (asm SWAP11) }", - "{ (asm SWAP12) }", - "{ (asm SWAP13) }", - "{ (asm SWAP14) }", - "{ (asm SWAP15) }", - "{ (asm SWAP16) }", - "{ (asm LOG0) }", - "{ (asm LOG1) }", - "{ (asm LOG2) }", - "{ (asm LOG3) }", - "{ (asm LOG4) }", - "{ (asm CREATE) }", - "{ (asm CALL) }", - "{ (asm CALLCODE) }", - "{ (asm RETURN) }", - "{ (asm DELEGATECALL) }", - "{ (asm STATICCALL) }", - "{ (asm REVERT) }", - "{ (asm INVALID) }", - "{ (asm SELFDESTRUCT) }" + "(asm STOP)", + "(asm ADD)", + "(asm MUL)", + "(asm SUB)", + "(asm DIV)", + "(asm SDIV )", + "(asm MOD)", + "(asm SMOD)", + "(asm ADDMOD)", + "(asm MULMOD)", + "(asm EXP)", + "(asm SIGNEXTEND)", + "(asm LT)", + "(asm GT)", + "(asm SLT)", + "(asm SGT)", + "(asm EQ)", + "(asm ISZERO)", + "(asm AND)", + "(asm OR)", + "(asm XOR)", + "(asm NOT)", + "(asm BYTE)", + "(asm KECCAK256)", + "(asm ADDRESS)", + "(asm BALANCE)", + "(asm ORIGIN)", + "(asm CALLER)", + "(asm CALLVALUE)", + "(asm CALLDATALOAD)", + "(asm CALLDATASIZE)", + "(asm CALLDATACOPY)", + "(asm CODESIZE)", + "(asm CODECOPY)", + "(asm GASPRICE)", + "(asm EXTCODESIZE)}", + "(asm EXTCODECOPY)", + "(asm RETURNDATASIZE)", + "(asm RETURNDATACOPY)", + "(asm EXTCODEHASH)", + "(asm BLOCKHASH)", + "(asm COINBASE)", + "(asm TIMESTAMP)", + "(asm NUMBER)", + "(asm DIFFICULTY)", + "(asm GASLIMIT)", + "(asm POP)", + "(asm MLOAD)", + "(asm MSTORE)", + "(asm MSTORE8)", + "(asm SLOAD)", + "(asm SSTORE)", + "(asm JUMP )", + "(asm JUMPI )", + "(asm PC)", + "(asm MSIZE)", + "(asm GAS)", + "(asm JUMPDEST)", + "(asm 0xff)", + "(asm 0xffff)", + "(asm 0xffffff)", + "(asm 0xffffffff)", + "(asm 0xffffffffff)", + "(asm 0xffffffffffff)", + "(asm 0xffffffffffffff)", + "(asm 0xffffffffffffffff)", + "(asm 0xffffffffffffffffff)", + "(asm 0xffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffffffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffffffffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffffffffffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffffffffffffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffffffffffffffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffffffffffffffffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffffffffffffffffffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)", + "(asm 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)", + "(asm DUP1)", + "(asm DUP2)", + "(asm DUP3)", + "(asm DUP4)", + "(asm DUP5)", + "(asm DUP6)", + "(asm DUP7)", + "(asm DUP8)", + "(asm DUP9)", + "(asm DUP10)", + "(asm DUP11)", + "(asm DUP12)", + "(asm DUP13)", + "(asm DUP14)", + "(asm DUP15)", + "(asm DUP16)", + "(asm SWAP1)", + "(asm SWAP2)", + "(asm SWAP3)", + "(asm SWAP4)", + "(asm SWAP5)", + "(asm SWAP6)", + "(asm SWAP7)", + "(asm SWAP8)", + "(asm SWAP9)", + "(asm SWAP10)", + "(asm SWAP11)", + "(asm SWAP12)", + "(asm SWAP13)", + "(asm SWAP14)", + "(asm SWAP15)", + "(asm SWAP16)", + "(asm LOG0)", + "(asm LOG1)", + "(asm LOG2)", + "(asm LOG3)", + "(asm LOG4)", + "(asm CREATE)", + "(asm CALL)", + "(asm CALLCODE)", + "(asm RETURN)", + "(asm DELEGATECALL)", + "(asm STATICCALL)", + "(asm REVERT)", + "(asm INVALID)", + "(asm SELFDESTRUCT)" }; for (size_t i = 0; i < opcodes_bytecode.size(); i++) |